StudentAnimator.cs 635 B

123456789101112131415161718192021
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class StudentAnimator : MonoBehaviour
  5. {
  6. public GameObject cameraSet;
  7. public Animator animator;
  8. private void OnEnable()
  9. {
  10. cameraSet.transform.localPosition = new Vector3(0, 1.2f, 6);
  11. cameraSet.transform.localEulerAngles = new Vector3(0, 180, 0);
  12. animator.SetBool("IsPlay", true);
  13. }
  14. private void OnDisable()
  15. {
  16. cameraSet.transform.localPosition = new Vector3(0, 1.2f, 0);
  17. cameraSet.transform.localEulerAngles = new Vector3(0, 0, 0);
  18. animator.SetBool("IsPlay", true);
  19. }
  20. }
粤ICP备19079148号