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

@@ -5,9 +5,14 @@ function Ground:init(x, y, player)
Ground.super.init(self, "assets/sprites/groundFin")
-- Collision properties
self:setZIndex(100)
self:setZIndex(ZIndex.ground)
self:setTag(3)
self:setGroups(CollideGroups.wall)
self:setCollideRect(0, 28, 800, 10)
self:setCollidesWithGroups(
{
CollideGroups.player
})
self:setSize(800, 32)
-- Main properties