改了格子大小

This commit is contained in:
tangbin
2025-07-25 15:36:10 +08:00
parent 5d63e4878c
commit f88a2e9504
1009 changed files with 69967 additions and 81 deletions

View File

@@ -20,6 +20,7 @@ public class UICellInfo : MonoBehaviour
public InputField txtCellHeight;
public bool bMapOpened;
public Text txtSelectInfo;
private void Awake()
{
@@ -93,4 +94,20 @@ public class UICellInfo : MonoBehaviour
MapManager.Instance.GenerateMap(UIWindow.Instance.uiMapPanel.CurOpenMapId,width * cellW, height * cellH, cellW, cellH);
ShowMapCellInfo();
}
public void Update()
{
bool isOpen = false;
do {
if (MapManager.Instance.map == null) break;
if (MapManager.Instance.map.selector == null) break;
if (MapManager.Instance.map.selector.selectedGridIndex.Count == 1)
{
int beginIndex = MapManager.Instance.map.selector.selectedGridIndex[0];
MapManager.Instance.map.selector.GetXyByIndex(beginIndex, out int x, out int y);
txtSelectInfo.text = string.Format("<22><>ѡ<EFBFBD><D1A1>:{0},{1} <20><>Ϣ:{2}", x, y, CellTypeColors.GetAreaStr((MapManager.Instance.map.selector.dataArray[beginIndex].barrier)));
isOpen = true;
}
} while (false);
txtSelectInfo.transform.parent.gameObject.SetActive(isOpen);
}
}