ss
This commit is contained in:
@@ -26,6 +26,8 @@ public class GridSelector : MonoBehaviour
|
||||
public int verticalNumber { get { return Mathf.CeilToInt(map.height / map.sideHeight); } }
|
||||
public int totalNumber { get { return horizontalNumber * verticalNumber; } }
|
||||
|
||||
public int moveNum;
|
||||
|
||||
private ComputeBuffer inputbuffer;
|
||||
private RenderData[] dataArray;
|
||||
|
||||
@@ -39,7 +41,7 @@ public class GridSelector : MonoBehaviour
|
||||
public void OnMapCreated(Map map)
|
||||
{
|
||||
this.map = map;
|
||||
|
||||
moveNum = 0;
|
||||
mapRenderer.material.SetVector("_Size", new Vector4(horizontalNumber, verticalNumber));
|
||||
mapRenderer.material.SetFloat("_UserInput", 1);
|
||||
inputbuffer = new ComputeBuffer(totalNumber, Marshal.SizeOf(typeof(RenderData)));
|
||||
@@ -414,14 +416,14 @@ public class GridSelector : MonoBehaviour
|
||||
}
|
||||
public void RefreshPlaneRender()
|
||||
{
|
||||
int runNum = 0;
|
||||
moveNum = 0;
|
||||
for (int i = 0; i < dataArray.Length; i++) {
|
||||
//int barrier = dataArray[i].barrier;
|
||||
setDataColor(i);
|
||||
CellType cell = (CellType)dataArray[i].barrier;
|
||||
if (cell.HasFlag(CellType.Move))
|
||||
{
|
||||
runNum++;
|
||||
moveNum++;
|
||||
}
|
||||
}
|
||||
inputbuffer.SetData(dataArray);
|
||||
|
||||
@@ -28,7 +28,7 @@ public partial class MapManager : MonoBehaviour
|
||||
/// <summary>
|
||||
/// <20><>ǰ<EFBFBD><C7B0>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>
|
||||
/// </summary>
|
||||
private MapRegions _curMapRegions;
|
||||
public MapRegions _curMapRegions;
|
||||
public bool LoadObsXml()
|
||||
{
|
||||
if (_curOpenMapId < 0)
|
||||
@@ -174,6 +174,7 @@ public partial class MapManager : MonoBehaviour
|
||||
}
|
||||
MapManager.Instance.ReseCamera(jpgscenew * mapColumn, jpgscenew * mapRownum);
|
||||
MapManager.Instance.GenerateMap(jpgscenew * mapColumn, jpgscenew * mapRownum, widthPixel / 100.0f, heightPixel / 100.0f);
|
||||
UICellInfo.Instance.ShowMapCellInfo();
|
||||
|
||||
}
|
||||
public void ClearMapRegions()
|
||||
|
||||
Reference in New Issue
Block a user