Compare commits
No commits in common. "7e24a44617733b16abc659fd0a6048ac423da24a" and "7f86166f8d0c6a8671f1b9e79625996a213ec2f0" have entirely different histories.
7e24a44617
...
7f86166f8d
4 changed files with 2 additions and 16 deletions
|
|
@ -33,10 +33,7 @@ function Room:draw()
|
||||||
camera:attach(0, 0, gw, gh)
|
camera:attach(0, 0, gw, gh)
|
||||||
self:canvasDraw()
|
self:canvasDraw()
|
||||||
camera:detach()
|
camera:detach()
|
||||||
if DEBUG then
|
if DEBUG then love.graphics.print('DEBUG', 2, 2) end
|
||||||
love.graphics.print('objects: '..#self.area.game_objects,2,gh-16)
|
|
||||||
love.graphics.print('DEBUG', 2, 2)
|
|
||||||
end
|
|
||||||
love.graphics.setCanvas()
|
love.graphics.setCanvas()
|
||||||
|
|
||||||
love.graphics.setColor(255, 255, 255, 255)
|
love.graphics.setColor(255, 255, 255, 255)
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,6 @@ function Player:update(dt)
|
||||||
-- move collision area
|
-- move collision area
|
||||||
self.collider:moveTo(self.x, self.y)
|
self.collider:moveTo(self.x, self.y)
|
||||||
|
|
||||||
-- offscreen kill
|
|
||||||
if self.x < 0-self.w then self:kill() end
|
|
||||||
if self.y < 0-self.h then self:kill() end
|
|
||||||
if self.x > gw+self.w then self:kill() end
|
|
||||||
if self.y > gh+self.h then self:kill() end
|
|
||||||
|
|
||||||
if input:pressed('f11') then self:kill() end
|
if input:pressed('f11') then self:kill() end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,6 @@ function Projectile:update(dt)
|
||||||
|
|
||||||
-- move collision area
|
-- move collision area
|
||||||
self.collider:moveTo(self.x, self.y)
|
self.collider:moveTo(self.x, self.y)
|
||||||
|
|
||||||
-- offscreen despawn
|
|
||||||
if self.x < 0 then self:kill() end
|
|
||||||
if self.y < 0 then self:kill() end
|
|
||||||
if self.x > gw then self:kill() end
|
|
||||||
if self.y > gh then self:kill() end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---Draws Projectile
|
---Draws Projectile
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ end
|
||||||
function CircleRoom:canvasDraw()
|
function CircleRoom:canvasDraw()
|
||||||
CircleRoom.super.canvasDraw(self)
|
CircleRoom.super.canvasDraw(self)
|
||||||
love.graphics.setColor(1, 1, 1)
|
love.graphics.setColor(1, 1, 1)
|
||||||
|
love.graphics.print('objects: '..#self.area.game_objects,2,gh-16)
|
||||||
end
|
end
|
||||||
|
|
||||||
return CircleRoom
|
return CircleRoom
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue