Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't accidently unpause a not started game

  • Loading branch information...
commit 488d39cfd1161805b61ca1e903c11d0ddc8b40b2 1 parent fa7baef
@TomK32 authored
Showing with 6 additions and 0 deletions.
  1. +3 −0  game_controller.lua
  2. +3 −0  main.lua
View
3  game_controller.lua
@@ -26,6 +26,9 @@ GameController:include({
end,
update = function(self, dt)
+ if not game_state.started then
+ return
+ end
for i, player in ipairs(self.game_state.players) do
player:update(dt)
end
View
3  main.lua
@@ -38,6 +38,9 @@ function love.update(dt)
end
function love.keypressed(key, unicode)
+ if not game_state.started then
+ return
+ end
dt_since_last_move = 1 -- to allow rapid key hitting
if unicode >= 49 and unicode < 59 then
game_state.player:setSpeed(unicode - 48)

0 comments on commit 488d39c

Please sign in to comment.
Something went wrong with that request. Please try again.