稍微修改
This commit is contained in:
@@ -22,8 +22,8 @@ public class GridSelector : MonoBehaviour
|
||||
private MeshCollider mapCollider;
|
||||
|
||||
private Map map;
|
||||
public int horizontalNumber { get { return Mathf.CeilToInt(map.width / map.sideWidth); } }
|
||||
public int verticalNumber { get { return Mathf.CeilToInt(map.height / map.sideHeight); } }
|
||||
public int horizontalNumber { get { return Mathf.FloorToInt(map.width / map.sideWidth); } }
|
||||
public int verticalNumber { get { return Mathf.FloorToInt(map.height / map.sideHeight); } }
|
||||
public int totalNumber { get { return horizontalNumber * verticalNumber; } }
|
||||
|
||||
public int moveNum;
|
||||
@@ -335,6 +335,7 @@ public class GridSelector : MonoBehaviour
|
||||
}
|
||||
else if (selectedGridIndex.Count == 1)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
int beginIndex = selectedGridIndex[0];
|
||||
GetXyByIndex(beginIndex, out int x, out int y);
|
||||
string labelText = string.Format(
|
||||
@@ -346,8 +347,7 @@ public class GridSelector : MonoBehaviour
|
||||
labelText,
|
||||
style
|
||||
);
|
||||
//GUI.Label(new Rect(width - 820, 20, 400, 50), string.Format("所选点XY序列:({0},{1}) 高度{2} 点类型 {3}", x, y, ((dataArray[beginIndex].barrier >> 16) - 10000)/100.0f, CellTypeColors.GetAreaStr((dataArray[beginIndex].barrier)), style));
|
||||
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user