/** * Modifica la velocidad del comando "Move" en el Scorbot. LĂmite de 1 a 100. * @param robot Scorbot * @param value Velocidad. Debe estar entre 1-100 * @return void */ public void Speed(IK robot, int value) { // Offline mode robot.SetSpeed(value); stateMessageControl.WriteMessage("Done. SPEED \"" + robot.GetSpeed() + "\"", true); // Online mode if (gameController.GetOnlineMode()) { bool done = controller.RunCommandUIOnline("speed", value.ToString()); if (done) { stateMessageControl.WriteMessage("Done. Online SPEED \"" + value.ToString() + "\"", done); } else { stateMessageControl.WriteMessage("Error. Online SPEED \"" + value.ToString() + "\"", done); } } }
public void SpeedInputEnd(string speed) { robot.SetSpeed(int.Parse(speed)); speedText.text = speed; }