Exemple #1
0
 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);
 }
Exemple #2
0
    void DoPlayAnimation()
    {
        if (!setAnimator)
        {
            animator = curAI.GetComponentInChildren <Animator>();
        }

        if (animator)
        {
            animator.CrossFade(stateToPlay, crossfadeTime);
        }
    }