39 lines
877 B
C#
39 lines
877 B
C#
|
|
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;
|
|||
|
|
}
|
|||
|
|
}
|