改了格子大小

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

@@ -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();

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);
}
}

View File

@@ -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();

View File

@@ -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);
}
}