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(); }); } }
public void SendEvent(Animator animator, AnimEventPayload animEvent) { OnAnimEvent?.Invoke(animator, animEvent); }