123456789101112131415161718192021222324252627282930313233343536373839404142 |
- 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<SceneAnimationEvent>();
- this.AnimStart = info.AnimStart;
- this.AnimEnd = info.AnimEnd;
- }
- // Update is called once per frame
- void Update()
- {
-
- }
- /// <summary>
- /// 播放开始
- /// </summary>
- public void PlayStartEvent()
- {
- if(AnimStart != null)
- {
- AnimStart();
- }
- }
- public void PlayEndEvent()
- {
- if(AnimEnd != null)
- {
- AnimEnd();
- }
- }
- }
|