From 42ea4a9e9efb0e77dffb9b3976d372c6d590cd2c Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 18 Jul 2017 11:42:46 -0400 Subject: [PATCH] score on death --- lib/game.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/game.lua b/lib/game.lua index 88c2c86..fec3457 100644 --- a/lib/game.lua +++ b/lib/game.lua @@ -167,8 +167,10 @@ function Game:toggle_tracks() return true end function Game:update_distance(dt) - local d = (dt * self.distance_rate) - self.distance = self.distance + d + if not self.dead then + local d = (dt * self.distance_rate) + self.distance = self.distance + d + end end function Game:update_background_speed(dt) --