地编
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Remoting.Metadata.W3cXsd2001;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.VFX;
|
||||
@@ -11,7 +12,7 @@ using static GridSelector;
|
||||
public class UICellInfo : MonoBehaviour
|
||||
{
|
||||
public static UICellInfo Instance;
|
||||
public Text txtMapWidth;
|
||||
public InputField txtMapWidth;
|
||||
public Text txtMapHeight;
|
||||
public Text txtTotalCells;
|
||||
public Text txtMoveCells;
|
||||
@@ -31,6 +32,7 @@ public class UICellInfo : MonoBehaviour
|
||||
{
|
||||
Cleanup();
|
||||
}
|
||||
public int CustomMapWidth => int.Parse(txtMapWidth.text);
|
||||
|
||||
void Cleanup()
|
||||
{
|
||||
@@ -65,7 +67,7 @@ public class UICellInfo : MonoBehaviour
|
||||
{
|
||||
if (MapManager.Instance.map == null || MapManager.Instance.map.selector == null)
|
||||
return;
|
||||
if(MapManager.Instance._curMapRegions == null) return;
|
||||
if (MapManager.Instance._curMapRegions == null) return;
|
||||
txtMapWidth.text = MapManager.Instance._curMapRegions.regionRowNum.ToString();
|
||||
txtMapHeight.text = MapManager.Instance._curMapRegions.regionColNum.ToString();
|
||||
txtCellRows.text = MapManager.Instance.map.selector.horizontalNumber.ToString();
|
||||
@@ -75,6 +77,17 @@ public class UICellInfo : MonoBehaviour
|
||||
txtCellHeight.text = MapManager.heightPixel.ToString();
|
||||
txtMoveCells.text = MapManager.Instance.map.selector.moveNum.ToString();
|
||||
}
|
||||
|
||||
public void ShowMapWidthAndHeight(int mapId)
|
||||
{
|
||||
if (!MapManager.Instance.allMaps.TryGetValue(mapId.ToString(), out var mapInfo))
|
||||
{
|
||||
UIWindow.Instance.ShowMessage("<22><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD><EFBFBD><EFBFBD>");
|
||||
return;
|
||||
}
|
||||
txtMapWidth.text = mapInfo.maxRow.ToString();
|
||||
txtMapHeight.text = mapInfo.maxCol.ToString();
|
||||
}
|
||||
/// <summary>
|
||||
/// <20><><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD>
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user