改了格子大小
This commit is contained in:
@@ -251,11 +251,6 @@ public class UICellEditor : MonoBehaviour
|
||||
/// </summary>
|
||||
public void CleanSelectArea()
|
||||
{
|
||||
if (editorGrid == CellType.None)
|
||||
{
|
||||
UIWindow.Instance.ShowMessage("<22><>ǰû<C7B0>пɱ༭<C9B1><E0BCAD><EFBFBD><EFBFBD>");
|
||||
return;
|
||||
}
|
||||
if (!MapManager.Instance.isOpenMap())
|
||||
return;
|
||||
MapManager.Instance.map.selector.ClearSelectArea();
|
||||
@@ -264,12 +259,7 @@ public class UICellEditor : MonoBehaviour
|
||||
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
public void FullSelectArea()
|
||||
{
|
||||
if (editorGrid == CellType.None)
|
||||
{
|
||||
UIWindow.Instance.ShowMessage("<22><>ǰû<C7B0>пɱ༭<C9B1><E0BCAD><EFBFBD><EFBFBD>");
|
||||
return;
|
||||
}
|
||||
{
|
||||
if (!MapManager.Instance.isOpenMap())
|
||||
return;
|
||||
MapManager.Instance.map.selector.FullAllArea();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ public class UIMapPanel : MonoBehaviour
|
||||
private int _curOpenMapId;
|
||||
private bool _saving;
|
||||
public int CurOpenMapId => _curOpenMapId;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
@@ -84,7 +83,10 @@ public class UIMapPanel : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ExportMap()
|
||||
{
|
||||
MapManager.Instance.SaveAtlasToFile();
|
||||
}
|
||||
public void ScanMap()
|
||||
{
|
||||
MapManager.Instance.allMaps.Clear();
|
||||
|
||||
@@ -168,4 +168,9 @@ public class UIMonsterItem : UIBaseItem
|
||||
btnHide.onClick.RemoveAllListeners();
|
||||
btnHide.onClick.AddListener(OnHideSelf);
|
||||
}
|
||||
public override void OnClickItemSelf()
|
||||
{
|
||||
base.OnClickItemSelf();
|
||||
UIWindow.Instance.uiMonstersPanel.OnClickItem(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user