コード例 #1
0
        /*protected void go (){
         *      double xx;
         *      bool xy= true;
         *
         *      xx = x;
         *      GoForward ();
         *      do{
         *              if((xx-x)>=5){
         *                      xy= false;
         *                              }
         *
         *      }while(xy);
         *
         *      Halt ();
         * }*/


        #region Protected Event Handlers

        /// <summary>
        /// Raises the robot update event.
        /// </summary>
        /// <param name="e">E.</param>
        protected virtual void OnRobotUpdate(RobotUpdateEventArgs e)
        {
            if (RobotUpdated != null)
            {
                RobotUpdated(this, e);
            }
        }
コード例 #2
0
ファイル: MapWindow.cs プロジェクト: michaelchi08/slambot
        /// <summary>
        /// Handles the robot update event.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">E.</param>
        private void Robot_Update(object sender, RobotUpdateEventArgs e)
        {
//			if (IsRealized)
//			{
//				textView.Buffer.Text += "Robot: x = " + e.Robot.X +
//				", y = " + e.Robot.Y +
//				", rotation = " + e.Robot.Rotation +
//				"\n";
//			}
        }
コード例 #3
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
     if (lastRotation == -7.0)
     {
         lastRotation = e.Robot.Heading;
     }
     else
     {
         relativeRotation += e.Robot.Heading - lastRotation;
         lastRotation      = e.Robot.Heading;
     }
 }
コード例 #4
0
ファイル: Robot.cs プロジェクト: abdulrahman-alhemmy/slambot
 /// <summary>
 /// Raises the update robot event.
 /// </summary>
 private void RaiseRobotUpdate()
 {
     RobotUpdateEventArgs args = new RobotUpdateEventArgs (this);
     OnRobotUpdate (args);
 }
コード例 #5
0
ファイル: Robot.cs プロジェクト: abdulrahman-alhemmy/slambot
 /// <summary>
 /// Raises the robot update event.
 /// </summary>
 /// <param name="e">E.</param>
 protected virtual void OnRobotUpdate(RobotUpdateEventArgs e)
 {
     if (RobotUpdated != null)
     {
         RobotUpdated (this, e);
     }
 }
コード例 #6
0
 /// <summary>
 /// Path_s the update.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Path_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
 }
コード例 #7
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
     if (lastRotation == -7.0)
     {
         lastRotation = e.Robot.Heading;
     }
     else
     {
         relativeRotation += e.Robot.Heading - lastRotation;
         lastRotation = e.Robot.Heading;
     }
 }
コード例 #8
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     Console.Write (e.ToString ());
     QueueDraw ();
 }
コード例 #9
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     Console.Write(e.ToString());
     QueueDraw();
 }
コード例 #10
0
 /// <summary>
 /// Path_s the update.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Path_Update(object sender, RobotUpdateEventArgs e)
 {
     // On the first update.
 }
コード例 #11
0
 /// <summary>
 /// Handles the robot update event.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="e">E.</param>
 private void Robot_Update(object sender, RobotUpdateEventArgs e)
 {
     //			if (IsRealized)
     //			{
     //				textView.Buffer.Text += "Robot: x = " + e.Robot.X +
     //				", y = " + e.Robot.Y +
     //				", rotation = " + e.Robot.Rotation +
     //				"\n";
     //			}
 }
コード例 #12
0
        /// <summary>
        /// Raises the update robot event.
        /// </summary>
        private void RaiseRobotUpdate()
        {
            RobotUpdateEventArgs args = new RobotUpdateEventArgs(this);

            OnRobotUpdate(args);
        }