Пример #1
0
 private void OnAnimEvent(Animator animator, AnimEventPayload animEvent)
 {
     if (animEvent.key == STARS_KEY && animEvent.value == _numStars)
     {
         // TODO: this was a quick hack to splice some animations together
         float delay = _numStars == 3 ? 1.3f : _numStars == 2 ? 0.7f : 0.6f;
         CoroutineRunner.WaitSecondsThenRun(delay, () =>
         {
             animator.StopPlayback();
             animator.enabled = false;
             _tallyAnimation.Play();
         });
     }
 }
Пример #2
0
 public void SendEvent(Animator animator, AnimEventPayload animEvent)
 {
     OnAnimEvent?.Invoke(animator, animEvent);
 }