ss
This commit is contained in:
@@ -8,6 +8,7 @@ using UnityEngine.UI;
|
||||
///<2F><><EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ӣ<EFBFBD><D3A3><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>
|
||||
public class UICellInfo : MonoBehaviour
|
||||
{
|
||||
public static UICellInfo Instance;
|
||||
public Text txtMapWidth;
|
||||
public Text txtMapHeight;
|
||||
public Text txtTotalCells;
|
||||
@@ -19,10 +20,12 @@ public class UICellInfo : MonoBehaviour
|
||||
|
||||
public bool bMapOpened;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
MapManager.Instance.onLoadFinishedCallback = OnLoadFinished;
|
||||
|
||||
Cleanup();
|
||||
}
|
||||
|
||||
@@ -40,20 +43,6 @@ public class UICellInfo : MonoBehaviour
|
||||
bMapOpened = false;
|
||||
}
|
||||
|
||||
void OnCreatedMap(int mapId, int mapWidth, int mapHeight)
|
||||
{
|
||||
bMapOpened = true;
|
||||
txtMapWidth.text = mapWidth.ToString();
|
||||
txtMapHeight.text = mapHeight.ToString();
|
||||
}
|
||||
|
||||
void OnLoadFinished()
|
||||
{
|
||||
txtMapWidth.text = MapManager.Instance.mapWidth.ToString();
|
||||
txtMapHeight.text = MapManager.Instance.mapHeight.ToString();
|
||||
bMapOpened = true;
|
||||
}
|
||||
|
||||
public void CloseMap()
|
||||
{
|
||||
Cleanup();
|
||||
@@ -69,6 +58,20 @@ public class UICellInfo : MonoBehaviour
|
||||
{
|
||||
MapManager.Instance.HideMapGrid();
|
||||
}
|
||||
public void ShowMapCellInfo()
|
||||
{
|
||||
if (MapManager.Instance.map == null || MapManager.Instance.map.selector == null)
|
||||
return;
|
||||
if(MapManager.Instance._curMapRegions == null) return;
|
||||
txtMapWidth.text = MapManager.Instance._curMapRegions.regionColNum.ToString();
|
||||
txtMapHeight.text = MapManager.Instance._curMapRegions.regionRowNum.ToString();
|
||||
txtCellRows.text = MapManager.Instance.map.selector.horizontalNumber.ToString();
|
||||
txtCellCols.text = MapManager.Instance.map.selector.verticalNumber.ToString();
|
||||
txtTotalCells.text = MapManager.Instance.map.selector.totalNumber.ToString();
|
||||
txtCellWidth.text = MapManager.widthPixel.ToString();
|
||||
txtCellHeight.text = MapManager.heightPixel.ToString();
|
||||
txtMoveCells.text = MapManager.Instance.map.selector.moveNum.ToString();
|
||||
}
|
||||
|
||||
public void CalculationCells()
|
||||
{
|
||||
|
||||
@@ -392,7 +392,7 @@ public class UIMonsterPanel : MonoBehaviour
|
||||
DestroyImmediate(itemParent.GetChild(0).gameObject);
|
||||
}
|
||||
|
||||
_dicGroupItem.Clear();
|
||||
_dicGroupItem?.Clear();
|
||||
itemIdx = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user