mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-21 16:09:02 -06:00
Game over fadeout easing function now accelerates.
This commit is contained in:
parent
049806d9e2
commit
888312c578
@ -334,7 +334,12 @@ end
|
||||
|
||||
function GameMode:onGameOver()
|
||||
switchBGM(nil)
|
||||
love.graphics.setColor(0, 0, 0, 1 - 2 ^ (-self.game_over_frames / 30))
|
||||
local alpha = 1
|
||||
local animation_length = 90
|
||||
if self.game_over_frames < animation_length then
|
||||
alpha = math.pow(2048, self.game_over_frames/animation_length - 1)
|
||||
end
|
||||
love.graphics.setColor(0, 0, 0, alpha)
|
||||
love.graphics.rectangle(
|
||||
"fill", 64, 80,
|
||||
16 * self.grid.width, 16 * (self.grid.height - 4)
|
||||
|
Loading…
Reference in New Issue
Block a user