Editor canvas modification bugfix, selected tile preview fix
This commit is contained in:
@@ -21,6 +21,8 @@ end
|
||||
|
||||
|
||||
function LevelExpandCanvas(horizontal,vertical)
|
||||
local horizontal = horizontal or 0
|
||||
local vertical = vertical or 0
|
||||
local h = LevelGetTileWidth()
|
||||
local v = LevelGetTileHeight()
|
||||
|
||||
@@ -51,7 +53,7 @@ function LevelExpandCanvas(horizontal,vertical)
|
||||
-- get data from old canvas to new canvas
|
||||
for i = 1, #LevelTiles do
|
||||
for j = 1, #LevelTiles[i] do
|
||||
ExpandedLevel[i+expand_v][j+expand_h] = InstanceTile(LevelTiles[i][j])
|
||||
ExpandedLevel[i+expand_v][j+expand_h] = InstanceTile(LevelTiles[i][j].id)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -61,6 +63,8 @@ end
|
||||
|
||||
|
||||
function LevelReduceCanvas(horizontal,vertical)
|
||||
local horizontal = horizontal or 0
|
||||
local vertical = vertical or 0
|
||||
local h = LevelGetTileWidth()
|
||||
local v = LevelGetTileHeight()
|
||||
|
||||
@@ -91,12 +95,14 @@ function LevelReduceCanvas(horizontal,vertical)
|
||||
-- get data from old canvas to new canvas
|
||||
for i = 1, #ExpandedLevel do
|
||||
for j = 1, #ExpandedLevel[i] do
|
||||
ExpandedLevel[i][j] = InstanceTile(LevelTiles[i+expand_v][j+expand_h])
|
||||
ExpandedLevel[i][j] = InstanceTile(LevelTiles[i+expand_v][j+expand_h].id)
|
||||
end
|
||||
end
|
||||
|
||||
-- use new canvas
|
||||
LevelTiles = ExpandedLevel
|
||||
|
||||
LevelExpandCanvas()
|
||||
end
|
||||
|
||||
function LevelGetTileData()
|
||||
|
||||
Reference in New Issue
Block a user