12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- namespace Unity.VisualScripting
- {
-
-
-
-
-
- public sealed class AnyState : State
- {
- [DoNotSerialize]
- public override bool canBeDestination => false;
- public AnyState() : base()
- {
- isStart = true;
- }
- public override void OnExit(Flow flow, StateExitReason reason)
- {
-
- if (reason == StateExitReason.Branch)
- {
- return;
- }
- base.OnExit(flow, reason);
- }
- public override void OnBranchTo(Flow flow, IState destination)
- {
-
-
- foreach (var outgoingTransition in outgoingTransitionsNoAlloc)
- {
- if (outgoingTransition.destination != destination)
- {
- outgoingTransition.destination.OnExit(flow, StateExitReason.AnyBranch);
- }
- }
- }
- }
- }
|