using Godot; namespace Rokojori { [GlobalClass ] public partial class IterateActions : RJAction { [ExportGroup( "Read Only")] [Export] public int iterationIndex = 0; public override void _OnTrigger() { var num = this.NumDirectChildrenOf(); if ( num == 0 ) { iterationIndex = 0; return; } iterationIndex = MathX.Repeat( iterationIndex, num ); Actions.Trigger( this.GetNthDirectChild( iterationIndex ) ); iterationIndex++; } } }