private void ExecuteCommand(float nextCommandInSeconds, bool draw = true) { if (instructionsFeed.Count == 0) { OnRobotLost?.Invoke(); return; } RobotCommand cmd = instructionsFeed[0].command; instructionsFeed.RemoveAt(0); if (cmd != RobotCommand.NONE) { trashDeck.Add(cmd); } if (!reachedGoal) { OnSendCommand?.Invoke(cmd, nextCommandInSeconds); } if (draw) { DrawToFeed(); } else { SendSynchFeed(); } }
public bool SendCommand(enuUnitCommand Cmd, byte Par, ushort Pr2) { OnSendCommand?.Invoke(null, new SendCommandEventArgs() { Cmd = Cmd, Par = Par, Pr2 = Pr2 }); return(true); }
public void SendCommand(string dmcc) { OnSendCommand?.Invoke(this, dmcc); }