Reworked node display and worked on DSL interpretation
This commit is contained in:
@@ -8,9 +8,16 @@ public class MoveNode : ProgramNode
|
||||
{
|
||||
DisplayText = "Move";
|
||||
}
|
||||
public override void Execute(Robot robot)
|
||||
public override bool Execute(Robot robot)
|
||||
{
|
||||
robot.Position = targetPosition;
|
||||
nextNode.Execute(robot);
|
||||
if (nextNode != null)
|
||||
{
|
||||
return nextNode.Execute(robot);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user