Esempio n. 1
0
        void Awake() {
            view = GetComponent<NetView>();
            inventory = GetComponent<Inventory>();
            catAnimator = GetComponentInChildren<CatAnimator>();

            view.OnReadInstantiateData += Instantiate;

            InputHandler.Instance.ListenToKeyDown(TryPickup, KeyBind.Code(Bind.Interact));
        }
Esempio n. 2
0
        void Awake() {
            view = GetComponent<NetView>();
            catAnimator = GetComponentInChildren<CatAnimator>();
            inventory = GetComponent<Inventory>();

            // Note: Always register OnReadInstantiateData delegate in Awake
            // OnReadInstantiateData is called immediately after a View is created, so registering
            // in Start instead of Awake means you might miss out on the instantiate data.
            view.OnReadInstantiateData += Instantiate;
        }
Esempio n. 3
0
        void Awake()
        {
            view        = GetComponent <NetView>();
            inventory   = GetComponent <Inventory>();
            catAnimator = GetComponentInChildren <CatAnimator>();

            view.OnReadInstantiateData += Instantiate;

            InputHandler.Instance.ListenToKeyDown(TryPickup, KeyBind.Code(Bind.Interact));
        }
Esempio n. 4
0
        void Awake()
        {
            view        = GetComponent <NetView>();
            catAnimator = GetComponentInChildren <CatAnimator>();
            inventory   = GetComponent <Inventory>();

            // Note: Always register OnReadInstantiateData delegate in Awake
            // OnReadInstantiateData is called immediately after a View is created, so registering
            // in Start instead of Awake means you might miss out on the instantiate data.
            view.OnReadInstantiateData += Instantiate;
        }