some fixers

This commit is contained in:
Paul Liverman 2015-03-30 22:20:52 -07:00
parent 0dffba3258
commit 54f4e48d3a
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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