blob: 621f43b48ab95ff3ae88f43f91fc602eca66ade9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
obj = {}
gt = 0 -- game time
ft = 1/60 --frametime
scrollspeed = 0
respawntimer = 0
gameover = false
gamerunning = false
function startgame()
music(0, 0, 3)
wave[currentwave].start()
gamerunning = true
end
function updateobjs()
foreach(players, function(obj) obj:update() end)
foreach(enemies, function(obj) obj:update() end)
foreach(obj, function(obj) obj:update() end)
end
function drawobjs()
foreach(obj, function(obj) obj:draw() end)
foreach(enemies, function(obj) obj:draw() end)
foreach(players, function(obj) obj:draw() end)
end
|