2025-07-19 12:48:11 +08:00
|
|
|
|
using Cysharp.Threading.Tasks.Triggers;
|
2025-07-18 22:28:40 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using UnityEngine;
|
2025-07-19 12:48:11 +08:00
|
|
|
|
using UnityEngine.UI;
|
2025-07-18 22:28:40 +08:00
|
|
|
|
using static MapManager;
|
|
|
|
|
|
|
|
|
|
|
|
public class UIBaseItem : MonoBehaviour
|
|
|
|
|
|
{
|
|
|
|
|
|
public SceneArea sceneArea { get; set; }
|
2025-07-19 12:48:11 +08:00
|
|
|
|
public EditCellType editCellType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Button btnClickSelf; //<2F><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>
|
|
|
|
|
|
protected virtual void Awake()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (btnClickSelf == null) return;
|
|
|
|
|
|
btnClickSelf.onClick.AddListener(OnClickItemSelf);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-07-18 22:28:40 +08:00
|
|
|
|
public virtual void SetItemPos(Vector2Int pos) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
internal virtual void SetSelectPosItem()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2025-07-19 01:21:40 +08:00
|
|
|
|
|
|
|
|
|
|
public virtual void OnClickItemSelf()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (sceneArea == null) return;
|
|
|
|
|
|
MapManager.Instance.MoveToCamera(sceneArea.transform.position.x,sceneArea.transform.position.y);
|
|
|
|
|
|
}
|
2025-07-18 22:28:40 +08:00
|
|
|
|
}
|