diff options
| author | 1029chris <1029chris@gmail.com> | 2022-02-09 18:05:07 -0800 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2022-02-09 18:05:07 -0800 |
| commit | 3e37c3fd09e335101f3c0ed199c1607879af2f86 (patch) | |
| tree | 457b7f9314c4826aa8173291efc066b343db34b7 /update.lua | |
| parent | 08fee0aa2dbe709173aec43236b47ace8b14e0ac (diff) | |
MENU WORKS!!!!!!
Diffstat (limited to 'update.lua')
| -rw-r--r-- | update.lua | 39 |
1 files changed, 34 insertions, 5 deletions
@@ -1,11 +1,40 @@ -updatewaves() -updateobjs() +--scrolling and respawn stuff +respawntimer -= 1/60 +if gameover then + scrollspeed = mid(-1/60,scrollspeed-1/6000,1/60) + if respawntimer < 0 then + gameover = false + foreach(players, function(obj) obj:respawn() end) + setwave(mid(1,currentwave-2,#wave)) + end +elseif gamerunning then + updatewaves() + updateobjs() + scrollspeed = mid(0,scrollspeed+1/2000,1/60) +end +gt += scrollspeed + +if not gamerunning then + if btn(4) then + addplayer(18, 60, 16, 18) + startgame() + elseif btn(5) then + addplayer(18, 45, 16, 18) + addplayer(18, 75, 32, 34) + startgame() + end +end + --screenshake math shake = shake + 0.11 * (0 - shake); if shake < 1 then shake = 0 end + +if not doshake then + shake = 0 +end --add another player if they fire -if btn(4, 1) and playercount == 0 then - addplayer(32, 34) -end
\ No newline at end of file +-- if btn(4, 1) and playercount == 0 then +-- addplayer(32, 34) +-- end
\ No newline at end of file |
