diff options
| author | RibbonCable <ambiguousmachine@gmail.com> | 2022-02-19 00:50:49 -0800 |
|---|---|---|
| committer | RibbonCable <ambiguousmachine@gmail.com> | 2022-02-19 00:50:49 -0800 |
| commit | 05c10238d59c8e6e1289aa8cae930c3a4c940c53 (patch) | |
| tree | 31b143e3e9637f1731c3a6b943cafce348223cb9 /bullets.lua | |
| parent | 13450507f924af5743d24f2a19df4320cdbd1be8 (diff) | |
Token hunting: removed most of "local" before variables (seems to work fine), removed health from wall shooter since it was always 10, added check for coop and laser functionality on wave 16
Diffstat (limited to 'bullets.lua')
| -rw-r--r-- | bullets.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bullets.lua b/bullets.lua index 461ee15..ffb7fb9 100644 --- a/bullets.lua +++ b/bullets.lua @@ -7,7 +7,7 @@ function addbullet(x, y, velx, vely, good, sprite) sprite = sprite or 2 good = good or false - function bullet.draw(bullet) + function bullet.draw() spr(sprite, x, y) end @@ -26,7 +26,7 @@ function addbullet(x, y, velx, vely, good, sprite) end end - function bullet.update(bullet) + function bullet.update() --applying velocity x += velx y += vely @@ -85,7 +85,7 @@ function addlaser(x, y, r, enemy) end end - function laser.update(laser) + function laser.update() timer += ft --collision detection after the warm up if timer > 1.5 and timer < 3.6 then @@ -127,7 +127,7 @@ function addmissile(x, y, target) --basic small weak enemy collide = enemycollide } - function enemy.draw(enemy) + function enemy.draw() if enemy.inv < 0 or ceil(enemy.inv*10%2) == 1 then spr(42, enemy.x, enemy.y, 2, 1) end @@ -140,7 +140,7 @@ function addmissile(x, y, target) --basic small weak enemy addcircle(enemy.x+12, enemy.y+rnd(8), 0, rnd()/8, 2.1, 0.6, rnd({9,5})) enemymisc(enemy) if enemy.health <= 0 then -- die!!!!! - enemydie(enemy,17,2,10) + enemydie(enemy,17,2,17) end end |
