Skip to content

Commit

Permalink
Improve end screen and restarting a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
1j01 committed Mar 27, 2016
1 parent f10c438 commit a8179b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions game.coffee
Expand Up @@ -635,7 +635,8 @@ class TextEffect
return if @animation_time > 26 * @repeat

@animation_time += 1
delta = 20 - @animation
to = 20 + (if @repeat is Infinity then @animation_time else 0)
delta = to - @animation
@animation_velocity += delta / 20
@animation += @animation_velocity

Expand Down Expand Up @@ -682,8 +683,6 @@ class Game
@deposited_score = 0
@dropping_score = 0
@maximum_score = 0

@effects = []

restart: ->
@start()
Expand All @@ -694,6 +693,8 @@ class Game
@level.spawn_player()
{player} = @level

@effects = []

@view = {cx: player.x, cy: player.y, scale: 1}
@view_to = {cx: player.x, cy: player.y, scale: 1}

Expand Down

0 comments on commit a8179b2

Please sign in to comment.