following
This commit is contained in:
parent
fd8778e9f2
commit
b7562d53ae
4 changed files with 20 additions and 57 deletions
|
|
@ -26,7 +26,7 @@ public class TurnHandler : MonoBehaviour
|
|||
public enum GameState {PlayerTurn, EnemyTurn}
|
||||
public GameState currentGameState = GameState.PlayerTurn;
|
||||
|
||||
private int currentEnemy;
|
||||
private int currentEnemy = 0;
|
||||
|
||||
private void SortEnemies()
|
||||
{
|
||||
|
|
@ -53,13 +53,14 @@ public class TurnHandler : MonoBehaviour
|
|||
if (allDone)
|
||||
{
|
||||
currentGameState = GameState.EnemyTurn;
|
||||
enemyEntities[0].StartTurn();
|
||||
}
|
||||
}
|
||||
else if (currentGameState == GameState.EnemyTurn)
|
||||
{
|
||||
enemyEntities[currentEnemy].StartTurn();
|
||||
currentEnemy++;
|
||||
if (currentEnemy > enemyEntities.Count)
|
||||
if (currentEnemy > enemyEntities.Count - 1)
|
||||
{
|
||||
currentGameState = GameState.PlayerTurn;
|
||||
foreach (PlayerEntity player in playerEntities)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue