using UnityEngine.UI;
using UnityEngine;

public class FinalText : MonoBehaviour
{
    public string[] sucessText;
    public string[] failText;

    public Text winerOrNot; 

    public void chooseEndGameText(bool sucess)
    {
        int index;

        if(sucess)
        {
            index = Random.Range(0, sucessText.Length);
            this.winerOrNot.text = sucessText[index];
        }
        else
        {
            index = Random.Range(0, failText.Length);
            this.winerOrNot.text = failText[index];
        }
    }
}
