Commit cd9fdbb1 authored by 16도재형's avatar 16도재형

Turn available: Added ProceedTurn() from CivPresenter.cs (#7)

parent 0d91b115
...@@ -70,7 +70,7 @@ public class GameManager : MonoBehaviour { ...@@ -70,7 +70,7 @@ public class GameManager : MonoBehaviour {
innerRadius = outerRadius * Mathf.Sqrt(3.0f) / 2; innerRadius = outerRadius * Mathf.Sqrt(3.0f) / 2;
DrawMap(); DrawMap();
SelectNextUnit(); ProceedTurn();
} }
// Update is called once per frame // Update is called once per frame
...@@ -218,6 +218,25 @@ public class GameManager : MonoBehaviour { ...@@ -218,6 +218,25 @@ public class GameManager : MonoBehaviour {
isThereTodos = true; isThereTodos = true;
Focus(); Focus();
} }
public void ProceedTurn()
{
if (_game.IsInsideTurn)
_game.EndTurn();
_game.StartTurn();
SelectNextUnit();
if (_selectedActor == null)
{
if (_game.PlayerInTurn.Cities.FirstOrDefault() is CivModel.Common.CityCenter)
{
CivModel.Common.CityCenter city = _game.PlayerInTurn.Cities.FirstOrDefault();
if (city.PlacedPoint is CivModel.Terrain.Point)
Focus(city.PlacedPoint.Value);
}
}
NormalStateEnter();
}
// Camera focus // Camera focus
void Focus() void Focus()
......
...@@ -152,7 +152,7 @@ public class UIManager : MonoBehaviour { ...@@ -152,7 +152,7 @@ public class UIManager : MonoBehaviour {
} }
else else
{ {
GameManager.I.ProceedTurn();
} }
} }
......
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