stackinghats fini et horizontalhats pattern
This commit is contained in:
@@ -13,9 +13,8 @@ function HatBullet:init(x, y, dir, speed)
|
||||
self.physics.direction = dir
|
||||
-- Speed the bullet moves (pixels per frame at 30FPS)
|
||||
self.physics.speed = speed
|
||||
self.collision = false
|
||||
|
||||
|
||||
self.collider = Hitbox(self, self.width*0.225, self.height*0.25, self.width*0.55, self.height*0.6)
|
||||
self.destroy_on_hit = false
|
||||
end
|
||||
|
||||
function HatBullet:update()
|
||||
@@ -24,4 +23,9 @@ function HatBullet:update()
|
||||
super.update(self)
|
||||
end
|
||||
|
||||
function HatBullet:getDebugInfo()
|
||||
local info = super.getDebugInfo(self)
|
||||
table.insert(info, "Collider: " .. self.collider.x, self.collider.y)
|
||||
end
|
||||
|
||||
return HatBullet
|
||||
|
||||
Reference in New Issue
Block a user