now rooms are saved with level

This commit is contained in:
lustlion
2022-03-07 04:10:55 +01:00
parent 081fd99d04
commit 59a21aa655
3 changed files with 88 additions and 61 deletions

View File

@@ -17,8 +17,14 @@ function loadLevelTiles()
updateLevelDimensions()
indexLevelTiles()
createTileObjects()
createRoomObjects()
end
function createRoomObjects()
for _, v in pairs(LevelData.objects.rooms) do
table.insert(LoadedObjects.Rooms, Collision:new(v[1][1],v[1][2],v[2][1],v[2][2]))
end
end
function expandLevelCanvas(horizontal,vertical)
local horizontal = horizontal or 0