inertia and refactor

This commit is contained in:
2024-06-03 00:31:15 +03:00
parent 3ca6427583
commit 4f6d0a6c24
9 changed files with 94 additions and 54 deletions

View File

@@ -15,10 +15,15 @@ function Baleba:init(x, y, player, loop)
self.animation:setState("run")
-- Collision properties
self:setZIndex(11)
self:setZIndex(ZIndex.enemy)
self:setCollideRect(3, 25, 40, 15)
self:setTag(154)
self:setSize(64, 64)
self:setGroups(CollideGroups.enemy)
self:setCollidesWithGroups(
{
CollideGroups.player
})
-- Sprite properties
self.standrate = randomFloat(0.3, 2)