// 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(); }
public void AddTurns(int t) { Turns += t; TurnsText.GetComponent <TextMeshPro>().text = Turns.ToString(); if (Turns == 0) { StartCoroutine("EndLevel"); } }
//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()); }