ball.lua - implement a random visiting ball

This commit is contained in:
Nick Stokoe
2022-07-02 23:00:27 +01:00
parent cb49e2b933
commit e75f2917c3
2 changed files with 30 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
local mkArena = require "arena"
local mkQbert = require "qbert"
local mkBall = require "ball"
local arena = mkArena(
7,
@@ -27,6 +28,12 @@ end
function love.update(dt)
time = time + dt
if time > 10 then
time = 0
table.insert(mobs, mkBall(arena))
end
if love.keyboard.isDown('i') then
qbert.jump('ne')
end