Commit af1ed246 authored by 18신대성's avatar 18신대성

Merge branch 'map' into polish

parents bbb52205 de2b26c8
...@@ -74,8 +74,8 @@ public class MapManager : SingletonBehaviour<MapManager> ...@@ -74,8 +74,8 @@ public class MapManager : SingletonBehaviour<MapManager>
currentMap.CreateObject(new Vector2Int((int)temp.xPos, (int)temp.yPos), ObjType.Mannequin, false); currentMap.CreateObject(new Vector2Int((int)temp.xPos, (int)temp.yPos), ObjType.Mannequin, false);
break; break;
case TileMode.goalFloor: case TileMode.goalFloor:
currentMap.GetFloorAtPos(new Vector2Int((int)temp.xPos, (int)temp.yPos)).isGoalFloor = true; currentMap.SetGoalFloor(new Vector2Int((int)temp.xPos, (int)temp.yPos));
currentMap.GetFloorAtPos(new Vector2Int((int)temp.xPos, (int)temp.yPos)).RefreshGoal(); //currentMap.GetFloorAtPos(new Vector2Int((int)temp.xPos, (int)temp.yPos)).RefreshGoal();
break; break;
default: default:
break; break;
......
...@@ -28,7 +28,6 @@ public class ClearCondition ...@@ -28,7 +28,6 @@ public class ClearCondition
{ {
GameManager.inst.clearCounter--; GameManager.inst.clearCounter--;
isDone = true; isDone = true;
//Debug.Log(GameManager.inst.clearCounter)
if (GameManager.inst.clearCounter == 0) if (GameManager.inst.clearCounter == 0)
GameManager.inst.StartCoroutine(GameManager.inst.ClearStage()); GameManager.inst.StartCoroutine(GameManager.inst.ClearStage());
} }
......
...@@ -99,6 +99,17 @@ public class Map : MonoBehaviour ...@@ -99,6 +99,17 @@ public class Map : MonoBehaviour
for (int j = yMin; j <= yMax; j++) for (int j = yMin; j <= yMax; j++)
CreateFloor(new Vector2Int(i, j)); CreateFloor(new Vector2Int(i, j));
} }
/// <summary>
/// Create floor in rectangular area between pos1 and pos2.
/// </summary>
/// <param name="pos1"></param>
/// <param name="pos2"></param>
public void SetGoalFloor(Vector2Int pos)
{
GetFloorAtPos(pos).isGoalFloor = true;
if (GameManager.aFloor >= 0) clearConditions[GameManager.aFloor].IsDone(0, 1);
}
/// <summary> /// <summary>
/// Remove floor at position. /// Remove floor at position.
/// </summary> /// </summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment