ActionLifetimeExample.cs 419 B

123456789101112131415161718
  1. using UnityEngine;
  2. namespace QFramework.Example.ActionKit
  3. {
  4. public class ActionLifetimeExample : MonoBehaviour
  5. {
  6. void Start()
  7. {
  8. var delayAction = DelayAction.Allocate(1.0f, () => { Debug.Log("延时完毕"); });
  9. delayAction.OnBeganCallback = () => Debug.Log("开始延时");
  10. delayAction.OnEndedCallback = () => Debug.Log("结束延时");
  11. this.ExecuteNode(delayAction);
  12. }
  13. }
  14. }