private void Start() { InvokeRepeating("Patrol", 0f, Random.Range(2f, 6f)); instance = GameObject.Find("Player").GetComponent <Movement>(); target = GameObject.FindGameObjectWithTag("Player").GetComponent <Transform>(); fireball = GameObject.Find("Mage").GetComponent <FireballCast>(); }
override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { timer = Random.Range(minTime, maxTime); fireball = GameObject.Find("BossArcher").GetComponent <FireballCast>(); fireball.CastFireball(); }