Add Construct modes to map

This commit is contained in:
NOT_A_ROBOT
2023-10-03 08:18:10 +07:00
parent 33fc59bd5c
commit 22ca0a7c96
2 changed files with 29 additions and 25 deletions

View File

@@ -22,6 +22,8 @@ local mapCam={
local visibleModes
local touchDist
local grid
local min_x,max_x=-1500,1350
local min_y,max_y=-1900,660
local scene={}
@@ -66,8 +68,8 @@ end
local function _moveMap(dx,dy)
local k=_getK()
local x,y=_getPos()
if x>1300 and dx<0 or x<-1500 and dx>0 then dx=0 end
if y>620 and dy<0 or y<-1900 and dy>0 then dy=0 end
if x>max_x and dx<0 or x<min_x and dx>0 then dx=0 end
if y>max_y and dy<0 or y<min_y and dy>0 then dy=0 end
mapCam.xOy:translate(dx/k,dy/k)
end
function scene.wheelMoved(_,dy)