Exemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     ScoresText = transform.GetChild(0).GetChild(0);
     TurnsText  = transform.GetChild(1).GetChild(0);
     ScoresText.GetComponent <TextMeshPro>().text = Scores.ToString();
     TurnsText.GetComponent <TextMeshPro>().text  = Turns.ToString();
 }
Exemplo n.º 2
0
 public void AddTurns(int t)
 {
     Turns += t;
     TurnsText.GetComponent <TextMeshPro>().text = Turns.ToString();
     if (Turns == 0)
     {
         StartCoroutine("EndLevel");
     }
 }
Exemplo n.º 3
0
    //Called in the update method; assigns player UI elements to their correct values
    void UpdatePlayerStats()
    {
        HealthText.SetText(this.HP.ToString());

        TavernHealthText.SetText(this.HP.ToString());

        TavernGoldText.SetText(gold.ToString());

        GoldText.SetText(gold.ToString());

        XPText.SetText(xp.ToString());
        LevelText.SetText(level.ToString());

        TurnsText.SetText(turnNumber.ToString());
    }