// Use this for initialization void Start() { audioSource = GetComponent <AudioSource>(); anima = GetComponent <Animator>(); player = GameObject.FindGameObjectWithTag("Player"); aggroScript = GetComponentInChildren <AggroBox>(); obstacle = GetComponentInChildren <ObstacleDetection>(); playerScript = player.GetComponent <PlayerStateController>(); }
// Use this for initialization void Start() { audioSource = GetComponent <AudioSource>(); aggroScript = aggroBox.GetComponent <AggroBox>(); player = GameObject.FindGameObjectWithTag("Player"); playerScript = player.GetComponent <PlayerStateController>(); height = transform.position.y; anima = GetComponent <Animator>(); }