using System.Collections; using System.Collections.Generic; using UnityEngine; namespace DTYJ { public class ShaDaiObj : MonoBehaviour { private void OnDestroy() { ShuiZaiCtrl.Instance.UpdateGround(); } private void OnEnable() { var anim = GetComponent(); anim[anim.clip.name].normalizedTime = 0; anim.Play(); } } }