SpawnNodeExample.cs 585 B

123456789101112131415161718192021
  1. using UnityEngine;
  2. namespace QFramework.Example.ActionKit
  3. {
  4. public class SpawnNodeExample : MonoBehaviour
  5. {
  6. void Start()
  7. {
  8. var spawnNode = new SpawnNode();
  9. spawnNode.Add(DelayAction.Allocate(1.0f, () => Debug.Log(Time.time)));
  10. spawnNode.Add(DelayAction.Allocate(1.0f, () => Debug.Log(Time.time)));
  11. spawnNode.Add(DelayAction.Allocate(1.0f, () => Debug.Log(Time.time)));
  12. spawnNode.Add(DelayAction.Allocate(1.0f, () => Debug.Log(Time.time)));
  13. spawnNode.Add(DelayAction.Allocate(1.0f, () => Debug.Log(Time.time)));
  14. this.ExecuteNode(spawnNode);
  15. }
  16. }
  17. }