// 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>(); }
private void Awake() { if (!center) { ProvideCenterObject(); } center.position = transform.position; obstacleDetection = GetComponent <ObstacleDetection>(); positionByCell = GetComponent <PositionByCell>(); }