Exemplo n.º 1
0
 private void NextStep(HashedString finishedAnim)
 {
     if (currentStep >= 0 && emoteSteps[currentStep].timeout <= 0f)
     {
         kbac.onAnimComplete -= NextStep;
         if (emoteSteps[currentStep].finishcb != null)
         {
             emoteSteps[currentStep].finishcb(reactor);
         }
     }
     currentStep++;
     if (currentStep >= emoteSteps.Count || (UnityEngine.Object)kbac == (UnityEngine.Object)null)
     {
         End();
     }
     else
     {
         if (emoteSteps[currentStep].anim != HashedString.Invalid)
         {
             kbac.Play(emoteSteps[currentStep].anim, emoteSteps[currentStep].mode, 1f, 0f);
             if (kbac.IsStopped())
             {
                 DebugUtil.DevAssertArgs(false, "Emote is missing anim:", emoteSteps[currentStep].anim);
                 emoteSteps[currentStep].timeout = 0.25f;
             }
         }
         if (emoteSteps[currentStep].timeout <= 0f)
         {
             kbac.onAnimComplete += NextStep;
         }
         else
         {
             elapsed = 0f;
         }
         if (emoteSteps[currentStep].startcb != null)
         {
             emoteSteps[currentStep].startcb(reactor);
         }
     }
 }