ShaDaiObj.cs 438 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace DTYJ
  5. {
  6. public class ShaDaiObj : MonoBehaviour
  7. {
  8. private void OnDestroy()
  9. {
  10. ShuiZaiCtrl.Instance.UpdateGround();
  11. }
  12. private void OnEnable()
  13. {
  14. var anim = GetComponent<Animation>();
  15. anim[anim.clip.name].normalizedTime = 0;
  16. anim.Play();
  17. }
  18. }
  19. }