// Start is called before the first frame update void Start() { OnShopUsedCallback += UpdateUI; player = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); GameObject weaponHolder_ = GameObject.FindGameObjectWithTag("weaponController"); // Needed for accessing the currentWeapons weaponTransform = weaponHolder_.GetComponent <Transform>(); // Needed for activating/deactivating the Shooting weaponHolder = weaponHolder_.GetComponent <weaponSwitching>(); shopUIAnimator = shopUI.GetComponent <Animator>(); if (OnShopUsedCallback != null) { OnShopUsedCallback.Invoke(); } }
void Start() { gunMagazine = GunMagazine.instance; weaponHolder = GameObject.FindGameObjectWithTag("weaponController").GetComponent <weaponSwitching>(); bullets = magCapacity; }