Refactored funcs.lua
- Renamed st and sp to strTrueValues and frameTime respectively - Modified files calling these to use the new names - Tidying like formatTime now using a single string.format
This commit is contained in:
@@ -120,7 +120,7 @@ function IntervalTrainingGame:drawScoringInfo()
|
||||
love.graphics.print(
|
||||
self.das.direction .. " " ..
|
||||
self.das.frames .. " " ..
|
||||
st(self.prev_inputs)
|
||||
strTrueValues(self.prev_inputs)
|
||||
)
|
||||
love.graphics.printf("NEXT", 64, 40, 40, "left")
|
||||
love.graphics.printf("TIME LEFT", 240, 250, 80, "left")
|
||||
@@ -134,7 +134,7 @@ function IntervalTrainingGame:drawScoringInfo()
|
||||
|
||||
-- draw time left, flash red if necessary
|
||||
local time_left = self.section_time_limit - math.max(self:getSectionTime(), 0)
|
||||
if not self.game_over and not self.clear and time_left < sp(0,10) and time_left % 4 < 2 then
|
||||
if not self.game_over and not self.clear and time_left < frameTime(0,10) and time_left % 4 < 2 then
|
||||
love.graphics.setColor(1, 0.3, 0.3, 1)
|
||||
end
|
||||
love.graphics.printf(formatTime(time_left), 240, 270, 160, "left")
|
||||
|
||||
Reference in New Issue
Block a user