Code: Select all
function spawnWalls(x, y, width, height)
if width > 0 and height > 0 then
local wall = world:newRectangleCollider(x, y, width, height)
wall:setCollisionClass('Wall')
wall:setType('static')
table.insert(walls, wall)
end
end
Some collision classes also just don't work, for example I have an enemy class that should ignore the payer class, yet it doesn't the player can push it around.