Skip to content

Commit

Permalink
优化教程第七关细节
Browse files Browse the repository at this point in the history
  • Loading branch information
MrZ626 committed Sep 23, 2024
1 parent 6c8748f commit 97dcb1c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
1 change: 0 additions & 1 deletion assets/game/mode/brik/interior/tutorial/4.finesseBasic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ return {
-- Correct
table.remove(P.modeData.targetPreview,1)
P.modeData.keySaved=P.modeData.keySaved+(target.best-P.modeData.curKeyCount)
print(P.modeData.keySaved)
if #P.modeData.targetPreview==0 then
P.modeData.questFin=true
P.settings.spawnDelay=1e99
Expand Down
21 changes: 16 additions & 5 deletions assets/game/mode/brik/interior/tutorial/7.techrashPractice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ return {
P.modeData.multiplier=1
P.modeData.protect=false
P.modeData.display=false
P.modeData.techrashTimer=0
PROGRESS.setInteriorScore('tuto7_score',0)
PROGRESS.setInteriorScore('tuto7_time',2600,'<')
PROGRESS.setInteriorScore('tuto7_time',2600e3,'<')
end,
always=function(P)
if P.modeData.techrashTimer>0 then
P.modeData.techrashTimer=P.modeData.techrashTimer-1
end
end,
afterClear=function(P,clear)
if clear.line<4 then
Expand All @@ -45,10 +51,13 @@ return {
P.modeData.protect=false
local s1=P.modeData.score
local s2=math.min(s1+P.modeData.multiplier*math.min(P.combo,10),99)
if s2-s1>1 then
P.modeData.techrashTimer=P.modeData.techrashTimer+260*(s2-s1-1)
end
P.modeData.score=s2
PROGRESS.setInteriorScore('tuto7_score',s2)
if s2>=99 then
PROGRESS.setInteriorScore('tuto7_time',P.gameTime/1000,'<')
PROGRESS.setInteriorScore('tuto7_time',P.gameTime,'<')
P.modeData.display=STRING.time(P.gameTime/1000)
P:finish('win')
elseif s1<62 and s2>=62 then
Expand All @@ -63,17 +72,19 @@ return {
end
end,
drawOnPlayer=function(P)
GC.setColor(1,P.modeData.multiplier==1 and 1 or 0.62,1-P.combo*.26,P.modeData.protect and .5 or 1)
GC.setColor(1,P.modeData.multiplier==1 and 1 or 0.62,1.1-P.combo*.126,P.modeData.protect and .5 or 1)
FONT.set(80) GC.mStr(P.modeData.score,-300,-70)
FONT.set(30) GC.mStr(Text.target_score,-300,20)
FONT.set(30) GC.mStr(P.modeData.techrashTimer>0 and Text.target_score or Text.target_techrash,-300,20)
GC.setColor(1,1,1,.62)
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')),-300,60)
GC.mStr(STRING.time(PROGRESS.getInteriorScore('tuto7_time')/1000),-300,60)
end
end,
},
Expand Down

0 comments on commit 97dcb1c

Please sign in to comment.