Exemple #1
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();
        }
    }
Exemple #2
0
 public void displayUI(string displayText, bool playerColor, float length, turnAction startTurn)
 {
     StopAllCoroutines();
     StartCoroutine(displayUICor(displayText, playerColor, length, startTurn));
 }