using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class SceneAnimationEventLogic : MonoBehaviour { public Action AnimStart; public Action AnimEnd; // Start is called before the first frame update void Start() { SceneAnimationEvent info = this.gameObject.GetComponent(); this.AnimStart = info.AnimStart; this.AnimEnd = info.AnimEnd; } // Update is called once per frame void Update() { } /// /// 播放开始 /// public void PlayStartEvent() { if(AnimStart != null) { AnimStart(); } } public void PlayEndEvent() { if(AnimEnd != null) { AnimEnd(); } } }