using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class DiaoZhuangGO : MonoBehaviour,IStepNodeAction { UnityAction diaoZhuangAnimtionOver; public DiaoZhuangAnimCtrl animCtrl; // Start is called before the first frame update void Start() { } public void Active(ProcessEnum stepName, UnityAction nodeFinishedEvent) { diaoZhuangAnimtionOver = nodeFinishedEvent; if (stepName == ProcessEnum.teardown) animCtrl.SetSpeed(1); else animCtrl.SetSpeed(-1); animCtrl.Play(); } public void UnActive(ProcessEnum stepName) { } public void DiaoZhuangFinished() { diaoZhuangAnimtionOver?.Invoke(); } }