diff --git a/updateGame.lua b/updateGame.lua index 094a22d..d5f3e2d 100644 --- a/updateGame.lua +++ b/updateGame.lua @@ -7,6 +7,12 @@ function CheckHealth(p1, p2) end function updateGame(dt) + --add delay between key presses + KeyPressTime = math.max(0, KeyPressTime - dt) + if KeyPressTime <= 0 then + EnableKeyPress = true + end + TimeToPlaceWall = TimeToPlaceWall - dt if TimeToPlaceWall <= 0 then --place a wall at a random location