stackinghats fini et horizontalhats pattern

This commit is contained in:
Deadzi06
2026-08-09 19:50:33 +02:00
parent 0796d64a8d
commit 78130a3310
3 changed files with 87 additions and 21 deletions

View File

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