EventActionExample.cs 388 B

12345678910111213141516171819202122
  1. using UnityEngine;
  2. namespace QFramework.Example.ActionKit
  3. {
  4. public class EventActionExample : MonoBehaviour
  5. {
  6. void Start()
  7. {
  8. var eventAction = EventAction.Allocate(() => Debug.Log("执行 EventAction"));
  9. this.ExecuteNode(eventAction);
  10. }
  11. void Simplify()
  12. {
  13. this.Sequence()
  14. .Delay(1.0f)
  15. .Event(() => Debug.Log("延时了 1 秒"))
  16. .Begin();
  17. }
  18. }
  19. }