暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Break.cs 692B

123456789101112131415161718192021222324252627282930
  1. namespace Unity.VisualScripting
  2. {
  3. /// <summary>
  4. /// Stops the execution of the current loop.
  5. /// </summary>
  6. [UnitTitle("Break Loop")]
  7. [UnitCategory("Control")]
  8. [UnitOrder(13)]
  9. public class Break : Unit
  10. {
  11. /// <summary>
  12. /// The entry point for the break.
  13. /// </summary>
  14. [DoNotSerialize]
  15. [PortLabelHidden]
  16. public ControlInput enter { get; private set; }
  17. protected override void Definition()
  18. {
  19. enter = ControlInput(nameof(enter), Operation);
  20. }
  21. public ControlOutput Operation(Flow flow)
  22. {
  23. flow.BreakLoop();
  24. return null;
  25. }
  26. }
  27. }