public AIAggroEvent(UnitAI _ai, Unit _target) { ai = _ai; target = _target; rotator = ai.GetComponentInChildren <UnitRotationController>(); animator = ai.GetComponentInChildren <UnitAnimationController>(); MDebug.Log("Turnevent Queue start aggro"); Execute(0); }
void DoPlayAnimation() { if (!setAnimator) { animator = curAI.GetComponentInChildren <Animator>(); } if (animator) { animator.CrossFade(stateToPlay, crossfadeTime); } }