Beispiel #1
0
        //------------------------------------------------------------
        public void Awake()
        {
            playerInventory = FindObjectOfType<Widget_Inventory>();
            store = FindObjectOfType<StoreFront>();
            _weaponManager = FindObjectOfType<WeaponManager>();

            if (!playerInventory)
                Debug.Log("No link to player's inventory.");
            if (!_weaponManager)
            {
                Debug.Log("No link to players weapons.");
            }
        }
Beispiel #2
0
        public void Start()
        {
            var widgetPlayer = GameObject.FindWithTag("Player");
            _inventory = widgetPlayer.GetComponent<Widget_Inventory>();
            //			_laser = GameObject.FindGameObjectWithTag("Laser");
            //			_taser = GameObject.FindGameObjectWithTag("Taser");
            _weaponManager = FindObjectOfType<WeaponManager>();

            _weaponManager.HasTaser = true;
        }