private void Start() { qt = FindObjectOfType <QuestTimer>(); em = FindObjectOfType <EventManager>(); c = FindObjectOfType <currency>(); Tname = transform.GetChild(0).GetChild(0).GetComponent <TextMesh>(); Tname.text = name; Treward = transform.GetChild(0).GetChild(1).GetComponent <TextMesh>(); Treward.text = Reward.ToString() + "g"; Texp = transform.GetChild(0).GetChild(2).GetComponent <TextMesh>(); Texp.text = Exp.ToString() + "exp"; TDuration = transform.GetChild(0).GetChild(3).GetComponent <TextMesh>(); TDuration.text = duration / 60 + ":" + duration; heroHolder = FindObjectOfType <HeroSelection>().transform; Heroes = new GameObject[4]; heroS = new HeroStats[4]; for (int i = 0; i < 4; i++) { Heroes[i] = heroHolder.GetChild(i).gameObject; heroS[i] = Heroes[i].GetComponent <HeroStats>(); } }
void Start() { qt = FindObjectOfType <QuestTimer>(); }