完善编辑器
This commit is contained in:
@@ -53,4 +53,16 @@ public partial class MapManager : MonoBehaviour
|
||||
newPosition.y = Mathf.Clamp(y, 0, mapRealHeight);
|
||||
Camera.main.transform.position = new Vector3(x, y, -10);
|
||||
}
|
||||
|
||||
public Vector2Int GetCameraPos()
|
||||
{
|
||||
Vector2Int pos = new Vector2Int();
|
||||
pos.x = (int)Camera.main.transform.position.x;
|
||||
pos.y = (int)Camera.main.transform.position.y;
|
||||
pos.x = Mathf.Clamp(pos.x, 0, (int)mapRealWidth);
|
||||
pos.y = Mathf.Clamp(pos.y, 0, (int)mapRealHeight);
|
||||
pos.x = (int)(pos.x / map.sideWidth);
|
||||
pos.y = (int)(pos.y / map.sideHeight);
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,6 @@ public partial class MapManager : MonoBehaviour
|
||||
Destroy(child.gameObject);
|
||||
}
|
||||
UIWindow.Instance.uiCellInfo.CloseMap();
|
||||
UIWindow.Instance.uiMonstersPanel.RemoveAll();
|
||||
ClearMapRegions();
|
||||
Cleanup();
|
||||
}
|
||||
@@ -171,6 +170,8 @@ public partial class MapManager : MonoBehaviour
|
||||
_StartEditor = false;
|
||||
_brushRadius = 0;
|
||||
_brushCellType = CellType.None;
|
||||
UIWindow.Instance.uiEditMapConfig.Cleanup();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user