|
|
|
@ -1,12 +1,10 @@ |
|
|
|
|
function LoadMap(lvl) |
|
|
|
|
ClearWalls() |
|
|
|
|
|
|
|
|
|
local mapfilelocation = "maps/" |
|
|
|
|
local extention = ".lua" |
|
|
|
|
local mapname = mapfilelocation .. "map" .. lvl .. extention |
|
|
|
|
|
|
|
|
|
GameMap = STI(mapname) |
|
|
|
|
--Walls = {} |
|
|
|
|
Walls = {} |
|
|
|
|
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) |
|
|
|
|