Exemple #1
0
 /// <summary>
 /// starts the next enemies turn
 /// if all enemies have had their turn, switches to the player phase
 /// </summary>
 public void enemyTurn()
 {
     if (currentActiveUnits.Count > 0)
     {
         Unit currentUnit = currentActiveUnits.Dequeue();
         enemyTakeTurn(currentUnit);
     }
     else
     {
         switchTurn.Invoke(true);
     }
 }
Exemple #2
0
    private IEnumerator displayUICor(string displayText, bool playerTurn, float length, turnAction startTurn)
    {
        text.gameObject.SetActive(true);
        background.gameObject.SetActive(true);
        text.text        = displayText;
        background.color = playerTurn ? this.playerColor : this.enemyColor;
        yield return(new WaitForSeconds(length));

        text.gameObject.SetActive(false);
        background.gameObject.SetActive(false);
        if (startTurn != null)
        {
            startTurn.Invoke();
        }
    }
 public void EndTurn()
 {
     tileSelectionActive = SelectionType.INACTIVE;
     cursor.SetActive(false);
     switchTurn.Invoke(false);
 }