This commit is contained in:
tangbin
2025-06-22 15:21:25 +08:00
parent 89d395440a
commit 1cb6dc502f
22 changed files with 2241 additions and 7346 deletions

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using static MapManager;
public class SceneArea : MonoBehaviour
{
public EditCellType editCellType;
public int Idx;
public void SetSceneAreaData(EditCellType editCellType,int idx)
{
this.editCellType = editCellType;
Idx = idx;
}
public void OnPointerClick()
{
Debug.Log($"ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...");
}
public void OnPointerDrag(Vector3 mousePosition)
{
Vector2Int pos = MapManager.Instance.map.selector.GetMouseByCell();
SetAreaPos(pos);
}
public void OnPointerUp()
{
Debug.Log($"<22>ɿ<EFBFBD><C9BF><EFBFBD><EFBFBD><EFBFBD>...");
}
public void SetAreaPos(Vector2Int pos)
{
Vector3 realpos = MapManager.Instance.map.selector.getPosByGrid(pos);
transform.position = realpos;
}
}