改了格子大小
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user