From 54f4e48d3a1f944029588ba8f812956c1130247d Mon Sep 17 00:00:00 2001 From: Paul Liverman Date: Mon, 30 Mar 2015 22:20:52 -0700 Subject: [PATCH] some fixers --- src/Bullet.lua | 4 ++-- src/main.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bullet.lua b/src/Bullet.lua index d44177d..3ad0e98 100644 --- a/src/Bullet.lua +++ b/src/Bullet.lua @@ -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 diff --git a/src/main.lua b/src/main.lua index 63a0df0..9d69ef5 100644 --- a/src/main.lua +++ b/src/main.lua @@ -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