some fixers
This commit is contained in:
parent
0dffba3258
commit
54f4e48d3a
@ -1,6 +1,6 @@
|
||||
local defaultSpeed = 540/3*2
|
||||
|
||||
local function Bullet(x, y, w, h, speed, color)
|
||||
local function Bullet(x, y, w, h, speed, color, update)
|
||||
self = {}
|
||||
|
||||
self.x = x or 0
|
||||
@ -11,7 +11,7 @@ local function Bullet(x, y, w, h, speed, color)
|
||||
|
||||
if not speed then speed = defaultSpeed end
|
||||
--self.speed = speed or player.speed
|
||||
self.update = function(self, dt)
|
||||
self.update = update or function(self, dt)
|
||||
self.x = self.x + speed * dt
|
||||
end
|
||||
|
||||
|
@ -21,7 +21,7 @@ local function outOfBounds(e)
|
||||
-- everything once it reaches the far left is dead
|
||||
|
||||
--if e.x < e.w / 2 or e.y < e.h / 2 or e.y > lg.getHeight() + e.h / 2 then
|
||||
if e.x < e.w / 2 then
|
||||
if e.x < -e.w / 2 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user