Skip to content

Commit

Permalink
修interior一些地方行数会超出范围
Browse files Browse the repository at this point in the history
框架跟进
  • Loading branch information
MrZ626 committed Jul 10, 2024
1 parent 38a655d commit 3f9544c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Zenitha
Submodule Zenitha updated 4 files
+2 −5 init.lua
+2 −1 sysFX.lua
+23 −21 text.lua
+25 −23 tween.lua
3 changes: 2 additions & 1 deletion assets/game/mode/brik/interior/marathon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ return {
P:playSound('beep_rise')
else
-- TODO
P.stat.line=200
P:finish('AC')
return
end
Expand Down Expand Up @@ -66,7 +67,7 @@ return {
local P=GAME.mainPlayer
if not P then return end

local line=math.min(P.stat.line,math.floor(math.max(time-.26,0)*162))
local line=math.min(P.stat.line,math.floor(math.max(time-.26,0)*162),200)

-- XX/200
FONT.set(100)
Expand Down
7 changes: 4 additions & 3 deletions assets/game/mode/brik/interior/sprint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ return {
local P=GAME.mainPlayer
if not P then return end
if P.finished=='AC' then
P.stat.line=40
PROGRESS.setInteriorScore('marathon',30)
PROGRESS.setInteriorScore('sprint',
P.gameTime<60e3 and 200 or
Expand All @@ -43,7 +44,7 @@ return {
local P=GAME.mainPlayer
if not P then return end

local line=math.min(P.stat.line,math.floor(math.max(time-.26,0)*62))
local line=math.min(P.stat.line,math.floor(math.max(time-.26,0)*62),40)

-- XX/40
FONT.set(100)
Expand All @@ -55,15 +56,15 @@ return {
GC.rectangle('line',800-300-15,550-50-15,600+30,100+30)

-- Filling bar
if line==40 then
if line>=40 then
GC.setColor(.2,1,.4,.626)
else
GC.setColor(1,1,1,.626)
end
GC.rectangle('fill',800-300,550-50,math.floor(line/4)*4/40*600,100)

-- Timer
if line==40 and time>1.26 then
if line>=40 and time>1.26 then
FONT.set(60)
GC.setColor(COLOR.L)
GC.mStr(STRING.time(P.gameTime/1000),800,510)
Expand Down

0 comments on commit 3f9544c

Please sign in to comment.