using System.Collections.Generic; using System.Threading.Tasks; using Godot; public partial class Robot : Node3D { List nodes; bool isExecuting = false; ProgramNode currentNode; public override void _Ready() { } public override void _Process(double delta) { if (isExecuting) { if (currentNode.Execute(this, delta)) { currentNode = currentNode.nextNode; if (currentNode == null) { isExecuting = false; } } } } public void Move() { } public void SetupExecution(List nodes) { this.nodes = [.. nodes]; isExecuting = true; currentNode = nodes[0]; } }