private void Awake() { levelManager = GameObject.FindGameObjectWithTag("GameController").GetComponentInChildren <LevelManagerScript>(); trapManager = GameObject.FindGameObjectWithTag("GameController").GetComponentInChildren <TrapManagerScript>(); ballistaScript = GameObject.FindGameObjectWithTag("Player").GetComponent <BallistaScript>(); trapButtonScripts = FindObjectsOfType <TrapButtonScript>(); }
private void Awake() { trapManager = GameObject.FindGameObjectWithTag("GameController").GetComponentInChildren <TrapManagerScript>(); levelManager = GameObject.FindGameObjectWithTag("GameController").GetComponentInChildren <LevelManagerScript>(); uIManager = GameObject.FindGameObjectWithTag("GameController").GetComponentInChildren <UIManagerScript>(); ballistaScript = GameObject.FindGameObjectWithTag("Player").GetComponent <BallistaScript>(); price = trapManager.GetPrice(trapType); priceText.text = price.ToString(); }