AnimationTrigger.cs 386 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class AnimationTrigger : MonoBehaviour
  5. {
  6. Animator ani;
  7. private void Awake()
  8. {
  9. ani = GetComponent<Animator>();
  10. }
  11. public void WhiteToNormal()
  12. {
  13. ani.Play("WhiteToNormal", 1, 0);
  14. }
  15. public void TurnNormal()
  16. {
  17. ani.Play("Normal", 1, 0);
  18. }
  19. }