void Start() { pivot = transform.GetChild(0).position; player = GameObject.FindGameObjectWithTag("Player"); soulsManager = player.GetComponent <SoulsManager>(); GetComponentInChildren <UIPlayerUnlockCollision>().soulsNeededText = soulsRequired.ToString() + " souls needed to unlock"; }
void Start() { treeColider = GetComponent <Collider>(); player = GameObject.FindGameObjectWithTag("Player"); soulsManager = player.GetComponent <SoulsManager>(); material = GetComponent <Renderer>().material; fadeOut = false; close = false; GetComponentInChildren <UIPlayerUnlockCollision>().soulsNeededText = soulsRequired.ToString() + " souls needed to clear"; }
private void Awake() { instance = this; }