public void DrawBrush(int mouseGridX, int mouseGridY, bool isSeeObstacleType, int obstacleType, bool isSeeTerrainType, int terrainType) { if (isSeeObstacleType) { AStarEditorUtil.DrawObstacleTypeRect(astarMonoBehaviour, mouseGridX, mouseGridY, obstacleType); } if (isSeeTerrainType) { AStarEditorUtil.DrawdTerrainTypeRect(astarMonoBehaviour, mouseGridX, mouseGridY, terrainType); } }
void DrawDataDict() { for (int gridY = _target.astarConfigData.minGridY; gridY <= _target.astarConfigData.maxGridY; gridY++) { for (int gridX = _target.astarConfigData.minGridX; gridX <= _target.astarConfigData.maxGridX; gridX++) { int value = _target.astarConfigData.GetDataValue(gridX, gridY); int obstacleType = AStarUtil.GetObstacleType(value); int terrainType = AStarUtil.GetTerrainType(value); //draw obstacleType if (this.isSeeObstacleType && obstacleType == AStarConst.Default_Obstacle_Type_Value) { AStarEditorUtil.DrawObstacleTypeRect(_target, gridX, gridY, obstacleType); } // draw terrainType if (this.isSeeTerrainType && obstacleType == AStarConst.Default_Terrain_Type_Value) { AStarEditorUtil.DrawdTerrainTypeRect(_target, gridX, gridY, terrainType); } } } }