void Start() { _playerInput = transform.parent.parent.GetComponent <PlayerInput_Script>(); _playerInv = _playerInput.GetComponent <PlayerInv_Script>(); _swordPivot = transform.parent; _audioSource = _playerInv.GetComponent <AudioSource>(); }
void Start() { _playerInv = FindObjectOfType <PlayerInv_Script>(); _playerInput = _playerInv.GetComponent <PlayerInput_Script>(); _sword = _playerInv.transform.GetComponentInChildren <Sword_Script>(); _gameManangerScript = _playerInv.GameManagScript; _infoTextScreen = ShopButtons[0].transform.parent.parent.GetChild(2).gameObject; _infoText = _infoTextScreen.GetComponentInChildren <TextMeshProUGUI>(); _audioSource = GetComponent <AudioSource>(); ShopUI.SetActive(false); UpdateBloodBankUI(); _shopButtonsTexts = new List <TextMeshProUGUI>(); SetUpButtons(); }