Skip to content

Commit

Permalink
优化教程5和教程7的纪录信息显示
Browse files Browse the repository at this point in the history
可以按住ctrl键重看教程1~4
框架跟进
  • Loading branch information
MrZ626 committed Sep 29, 2024
1 parent 7485250 commit 6463c57
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Zenitha
Submodule Zenitha updated 2 files
+0 −0 debugExtend.lua
+1 −1 init.lua
10 changes: 5 additions & 5 deletions assets/game/mode/brik/interior/tutorial/5.finessePractice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ return {
if PROGRESS.getInteriorScore('tuto5_score')<99 then
P.modeData.display=PROGRESS.getInteriorScore('tuto5_score').."/99"
else
P.modeData.display=STRING.time(PROGRESS.getInteriorScore('tuto5_time')/1000)
P.modeData.display={COLOR.lY,STRING.time(PROGRESS.getInteriorScore('tuto5_time')/1000)}
end
end,
afterResetPos=function(P)
Expand All @@ -141,13 +141,12 @@ return {
if posSucc and keySucc then
-- Correct
P.modeData.finesseCombo=P.modeData.finesseCombo+1
if P.modeData.finesseCombo%3==0 then
PROGRESS.setInteriorScore('tuto5_score',P.modeData.finesseCombo)
end
if P.modeData.finesseCombo==99 then
PROGRESS.setInteriorScore('tuto5_score',99)
PROGRESS.setInteriorScore('tuto5_time',P.gameTime)
P.modeData.display=STRING.time(P.gameTime/1000)
P.modeData.display={COLOR.lY,STRING.time(PROGRESS.getInteriorScore('tuto5_time')/1000)}
P:finish('win')
else
end
table.remove(P.modeData.targetPreview,1)
P.modeData.correct=true
Expand All @@ -158,6 +157,7 @@ return {
table.insert(P.nextQueue,1,P.hand)
P.hand=nil
P:playSound(posSucc and 'rotate_failed' or 'move_failed',2)
P.modeData.display=PROGRESS.getInteriorScore('tuto5_score').."/99"
if not P.modeData.protect then
P.modeData.finesseCombo=math.max(P.modeData.finesseCombo-6,0)
P.modeData.protect=true
Expand Down
31 changes: 17 additions & 14 deletions assets/game/mode/brik/interior/tutorial/7.techrashPractice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ return {
P.modeData.protect=false
P.modeData.display=false
P.modeData.techrashTimer=0

if PROGRESS.getInteriorScore('tuto7_score')>=99 then
P.modeData.display=PROGRESS.getInteriorScore('tuto7_score').."/99"
else
P.modeData.display={COLOR.lY,PROGRESS.getInteriorScore('tuto7_time')/1000}
end
end,
always=function(P)
if P.modeData.techrashTimer>0 then
Expand Down Expand Up @@ -56,15 +62,18 @@ return {
PROGRESS.setInteriorScore('tuto7_score',s2)
if s2>=99 then
PROGRESS.setInteriorScore('tuto7_time',P.gameTime,'<')
P.modeData.display=STRING.time(P.gameTime/1000)
P.modeData.display={COLOR.lY,PROGRESS.getInteriorScore('tuto7_time')/1000}
P:finish('win')
elseif s1<62 and s2>=62 then
P.settings.holdSlot=0
P.holdQueue[1]=nil
elseif s1<10 and s2>=10 then
if not P.holdQueue[1] then
else
P.modeData.display=PROGRESS.getInteriorScore('tuto7_score').."/99"
if s1<62 and s2>=62 then
P.settings.holdSlot=0
P.modeData.multiplier=2
P.holdQueue[1]=nil
elseif s1<10 and s2>=10 then
if not P.holdQueue[1] then
P.settings.holdSlot=0
P.modeData.multiplier=2
end
end
end
end
Expand All @@ -77,13 +86,7 @@ return {
GC.mStr(Text.target_score,-300,20)
FONT.set(20)
GC.setColor(1,1,1,.872)
if P.modeData.display then
GC.mStr(P.modeData.display,-300,60)
elseif PROGRESS.getInteriorScore('tuto7_score')<99 then
GC.mStr(PROGRESS.getInteriorScore('tuto7_score'),-300,60)
else
GC.mStr(STRING.time(PROGRESS.getInteriorScore('tuto7_time')/1000),-300,60)
end
GC.mStr(P.modeData.display,-300,60)
end,
},
script={
Expand Down
2 changes: 1 addition & 1 deletion assets/scene/tutorial_in.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ end
local function playTutorial(level)
local unlock=PROGRESS.getTutorialPassed(level)
if unlock==0 then
elseif unlock<=2 then
elseif unlock<=2 or isCtrlPressed() then
SCN.go('game_in','none','brik/interior/tutorial/'..(
level==1 and '1.basic' or
level==2 and '2.sequence' or
Expand Down

0 comments on commit 6463c57

Please sign in to comment.