private void Awake() { //inicializao de variaveis health = GameObject.FindGameObjectWithTag("Player").GetComponent <Health>(); xp = GameObject.FindGameObjectWithTag("Player").GetComponent <XP>(); baseStats = GameObject.FindGameObjectWithTag("Player").GetComponent <CalcAtb>(); }
//mostra os valores atualizados dos atributos private void ShowStatsPoint() { CalcAtb sts = GameObject.FindGameObjectWithTag("Player").GetComponent <CalcAtb>(); strV.text = string.Format("{0:0}", sts.GetStats(Stats.Str)); proV.text = string.Format("{0:0}", sts.GetStats(Stats.Pro)); agiV.text = string.Format("{0:0}", sts.GetStats(Stats.Agi)); dexV.text = string.Format("{0:0}", sts.GetStats(Stats.Dex)); intV.text = string.Format("{0:0}", sts.GetStats(Stats.Int)); eruV.text = string.Format("{0:0}", sts.GetStats(Stats.Eru)); }