added timer for key delay
This commit is contained in:
parent
2e6fdcd3f0
commit
84e2125214
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user