Пример #1
0
 void Start()
 {
     text   = GetComponentInChildren <Text> ();
     accept = transform.FindChild("accept").gameObject;
     accept.SetActive(false);
     player = GameObject.FindGameObjectWithTag("Player").GetComponent <Questmaster> ();
     hide();
 }
Пример #2
0
    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> ();
    }