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

@@ -16,9 +16,14 @@ function Tank:init(x, y, player, ground)
Graphics.popContext()
-- Collision properties
self:setZIndex(99)
self:setZIndex(ZIndex.enemy)
self:setTag(2)
self:setCollideRect(4, 56, 147, 65)
self:setGroups(CollideGroups.enemy)
self:setCollidesWithGroups(
{
CollideGroups.player
})
-- Main properties
Tank.moveSpeed = 2