HelloWorldActionExample.cs 484 B

123456789101112131415161718192021222324
  1. using UnityEngine;
  2. namespace QFramework.Example.ActionKit
  3. {
  4. public class SayHelloWorld : ActionKitAction
  5. {
  6. protected override void OnBegin()
  7. {
  8. Debug.Log("Hello World !");
  9. // 结束此 Action
  10. Finish();
  11. }
  12. }
  13. public class HelloWorldActionExample : MonoBehaviour
  14. {
  15. // Use this for initialization
  16. void Start()
  17. {
  18. this.ExecuteNode(new SayHelloWorld());
  19. }
  20. }
  21. }