AnimationEventTriggers.cs 468 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. [RequireComponent(typeof(Animator))]
  6. public class AnimationEventTriggers : MonoBehaviour
  7. {
  8. Animator animator;
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. animator = GetComponent<Animator>();
  13. if (animator == null) return;
  14. }
  15. public void AnimationPauseEvent()
  16. {
  17. //animator.speed = 0;
  18. }
  19. }