Maze / Library /PackageCache /com.unity.visualscripting@1.8.0 /Runtime /VisualScripting.Flow /Framework /Time /WaitUnit.cs
| using System.Collections; | |
| namespace Unity.VisualScripting | |
| { | |
| [] | |
| public abstract class WaitUnit : Unit | |
| { | |
| /// <summary> | |
| /// The moment at which to start the delay. | |
| /// </summary> | |
| [] | |
| [] | |
| public ControlInput enter { get; private set; } | |
| /// <summary> | |
| /// The action to execute after the delay has elapsed. | |
| /// </summary> | |
| [] | |
| [] | |
| public ControlOutput exit { get; private set; } | |
| protected override void Definition() | |
| { | |
| enter = ControlInputCoroutine(nameof(enter), Await); | |
| exit = ControlOutput(nameof(exit)); | |
| Succession(enter, exit); | |
| } | |
| protected abstract IEnumerator Await(Flow flow); | |
| } | |
| } | |