完善编辑器

This commit is contained in:
tangbin
2025-07-19 12:48:11 +08:00
parent 2df2efaa3e
commit b8b50ec90b
27 changed files with 360 additions and 124 deletions

View File

@@ -12,9 +12,9 @@ public class UITeleportItem : UIBaseItem
public InputField txtNextMapPos; //<2F>¼<EFBFBD><C2BC><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>
public Button btnDel; //ɾ<><C9BE>
public int itemIdx;
private void Awake()
protected override void Awake()
{
base.Awake();
AddInputNameClickEvent(txtPos);
//AddInputNameClickEvent(txtNextMapPos);
btnDel.onClick.AddListener(RemoveSelf);
@@ -46,7 +46,16 @@ public class UITeleportItem : UIBaseItem
DestroyImmediate(gameObject);
MapManager.Instance.RemoveTeleportPointSize(itemIdx);
}
public override void SetItemPos(Vector2Int pos)
{
base.SetItemPos(pos);
txtPos.text = pos.ToString();
}
private void OnDestroy()
{
if (sceneArea == null) return;
Destroy(sceneArea.gameObject);
}
public bool CheckValid()
{
if (string.IsNullOrEmpty(txtPos.text))