Cleaned up TAP M-roll

This commit is contained in:
Ishaan Bhardwaj
2020-11-14 09:35:16 -05:00
parent b9b71e90bb
commit 721acefea0
6 changed files with 56 additions and 23 deletions

View File

@@ -305,10 +305,17 @@ MarathonA2Game.rollOpacityFunction = function(age)
else return 1 - (age - 240) / 60 end
end
function MarathonA2Game:drawGrid(ruleset)
MarathonA2Game.mRollOpacityFunction = function(age)
if age > 4 then return 0
else return 1 - age / 4 end
end
function MarathonA2Game:drawGrid()
if self.clear and not (self.completed or self.game_over) then
if not self:qualifiesForMRoll() then
self.grid:drawInvisible(self.rollOpacityFunction)
if self:qualifiesForMRoll() then
self.grid:drawInvisible(self.mRollOpacityFunction, nil, false)
else
self.grid:drawInvisible(self.rollOpacityFunction, nil, false)
end
else
self.grid:draw()