using System.Collections; using System.Collections.Generic; using System.ComponentModel; using EventParts; using Godot; using Godot.Bridge; using Godot.NativeInterop; [ScriptPath("res://Scripts/Events/EventParts/WaitFinished.cs")] public partial class WaitFinished : Node, EventPart { [Export(PropertyHint.None, "")] private Node[] waitFor; private List p = new List(); public bool parallel { get; set; } public EventController parent { get; set; } public Coroutine routine { get; set; } public override void _EnterTree() { for (int i = 0; i < waitFor.Length; i++) { p.Add((EventPart)waitFor[i]); } } public IEnumerator Routine() { bool flag; do { yield return null; flag = false; for (int i = 0; i < p.Count; i++) { if (!p[i].routine.done) { flag = true; } } } while (flag); } }