|
|
|
@ -8,6 +8,8 @@ function LoadMap(lvl) |
|
|
|
|
if GameMap.layers["Walls"] then |
|
|
|
|
for _, obj in ipairs(GameMap.layers["Walls"].objects) do |
|
|
|
|
local wall = World:newRectangleCollider(obj.x, obj.y, obj.width, obj.height) |
|
|
|
|
-- local wall = |
|
|
|
|
-- World:newRectangleCollider(obj.x * _G.X_SCALE, obj.y * _G.Y_SCALE, obj.width * _G.X_SCALE, obj.height * _G.Y_SCALE) |
|
|
|
|
wall:setType("static") |
|
|
|
|
table.insert(Walls, wall) |
|
|
|
|
Walls[#Walls]:setCollisionClass("Wall") |
|
|
|
|