diff options
| author | Chris Bradley <1029chris@gmail.com> | 2022-02-20 17:51:17 -0800 |
|---|---|---|
| committer | Chris Bradley <1029chris@gmail.com> | 2022-02-20 17:51:17 -0800 |
| commit | ae91f49c0e637c9b47f8ce5537f4e3a14eea1b92 (patch) | |
| tree | 5384a0fd4ed625ee8670a83cc9fd292a063cab0a /waves.lua | |
| parent | 8b236f9ee426381aacca305a8dc6803797aab62f (diff) | |
Main menu and win music!!! score scrolls in too
also fixed boss dropping stuff ONCE AND FOR ALL!!!!!!
Diffstat (limited to 'waves.lua')
| -rw-r--r-- | waves.lua | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -13,6 +13,13 @@ wave[1] = { start = function() addbasicenemy(150, 60, 0.15) end, + everysecond = function () + if currentwavetime > 1.9 then + playsong(0) + end + end, + song = -1, + fade = 1800 } for i = 2, 16, 1 do @@ -268,13 +275,15 @@ wave[19] = { canshootatx = 110 addfinalboss() end, - song = 17 + song = 17, + fade = 500 } --ending score screen wave[20] = { delay = 4, start = function() + menuscroll = 128 --so that the score menu can scroll in if not coopmode and highscore0 < currentscore then dset(0, currentscore) --set singleplayer score elseif coopmode and highscore1 < currentscore then @@ -282,7 +291,8 @@ wave[20] = { end end, conditions = function() - end + end, + song = 31, } foreach(wave, function(wave) if not wave.conditions then wave.conditions = function() if #enemies < 1 then return true end end end end) --if there are no conditons for a wave, give them one. look at all those ends!!!! @@ -298,8 +308,8 @@ function updatewaves() end end if wave[currentwave].conditions() then - if wave[currentwave+1].song then - playsong(wave[currentwave+1].song) + if wave[currentwave+1].song and currentwave ~= 19 then --dont want the final wave to play the next song for dramatic effect + playsong(wave[currentwave+1].song, wave[currentwave+1].fade or 0) end delaytimer += ft if delaytimer > wave[currentwave+1].delay then @@ -312,6 +322,5 @@ function setwave(num) currentwave = num everysecondtimer,currentwavetime,delaytimer = 0,0,0 wave[currentwave].start() - local song = wave[currentwave].song or 0 - playsong(song) + playsong(wave[currentwave].song or 0, wave[currentwave].fade or 0) end
\ No newline at end of file |
