void Start() { text = GetComponentInChildren <Text> (); accept = transform.FindChild("accept").gameObject; accept.SetActive(false); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Questmaster> (); hide(); }
void Start() { buttons = new List <Transform> (); state = bookstate.def; Transform wrapper = transform.FindChild("context"); for (int i = 0; i < wrapper.childCount; i++) { buttons.Add(wrapper.GetChild(i)); } Transform player = GameObject.FindGameObjectWithTag("Player").transform; invent = player.GetComponent <Inventory> (); title = transform.FindChild("title").GetComponent <Text> (); qmaster = player.GetComponent <Questmaster> (); info = transform.FindChild("info").GetComponent <Text> (); }