C# Класс SLAMBot.Engine.FakeRobot

An in-memory simulated robot.
Наследование: IRobot
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
FakeRobot ( EnvironmentMap map ) : System

Creates a fake robot that plays in the given map.

Move ( int steps, System.Action callback ) : void

Moves the robot forwards or backwards.

Rotate ( int degrees, System.Action callback ) : void

Rotates the robot in place.

SonarPing ( Action callback ) : void

Sends a SONAR ping.

Step ( ) : void

Runs a single step of the robot's simulation. This method should be called repeatedly.

Teleport ( Location destination ) : void

Instantly teleports the robot to an arbitrary location.

Приватные методы

Метод Описание
MotionIterator ( int steps, System.Action callback ) : IEnumerator
RotationIterator ( int degrees, System.Action callback ) : IEnumerator

Описание методов

FakeRobot() публичный Метод

Creates a fake robot that plays in the given map.
public FakeRobot ( EnvironmentMap map ) : System
map EnvironmentMap
Результат System

Move() публичный Метод

Moves the robot forwards or backwards.
public Move ( int steps, System.Action callback ) : void
steps int The (signed) number of units to move.
callback System.Action A callback to call when the movement completes.
Результат void

Rotate() публичный Метод

Rotates the robot in place.
public Rotate ( int degrees, System.Action callback ) : void
degrees int The number of degrees to rotate by.
callback System.Action A callback to call when the rotation completes.
Результат void

SonarPing() публичный Метод

Sends a SONAR ping.
public SonarPing ( Action callback ) : void
callback Action
Результат void

Step() публичный Метод

Runs a single step of the robot's simulation. This method should be called repeatedly.
public Step ( ) : void
Результат void

Teleport() публичный Метод

Instantly teleports the robot to an arbitrary location.
public Teleport ( Location destination ) : void
destination Location The location to move to. This location must be unoccupied.
Результат void