editor fix, camera confined to level
This commit is contained in:
@@ -127,23 +127,10 @@ function EditorDoEdit()
|
||||
|
||||
elseif Keybind:HasPressed(Keybind.generic.lshift) then
|
||||
LevelExpandCanvas(math.sign(expand_h),math.sign(expand_v))
|
||||
|
||||
if expand_h < 0 then
|
||||
Camera.pos.x = Camera.pos.x - math.sign(expand_h)*tileProperties.scale*tileProperties.width
|
||||
end
|
||||
if expand_v < 0 then
|
||||
Camera.pos.y = Camera.pos.y - math.sign(expand_v)*tileProperties.scale*tileProperties.height
|
||||
end
|
||||
|
||||
LevelReloadTiles()
|
||||
elseif Keybind:HasPressed(Keybind.generic.lctrl) then
|
||||
LevelReduceCanvas(math.sign(expand_h),math.sign(expand_v))
|
||||
|
||||
if expand_h < 0 then
|
||||
Camera.pos.x = Camera.pos.x - math.sign(expand_h)*tileProperties.scale*tileProperties.width
|
||||
end
|
||||
if expand_v < 0 then
|
||||
Camera.pos.y = Camera.pos.y - math.sign(expand_v)*tileProperties.scale*tileProperties.height
|
||||
end
|
||||
LevelReloadTiles()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user