Singleton class for managing the game play.
More...
#import <RKDriveControl.h>
List of all members.
Detailed Description
This class provides a high level interface for controlling a robot.
Member Function Documentation
- (void) driveWithAcceleration: |
|
(CMAcceleration) |
acceleration |
|
Method to updatre the robot's heading and speed from accelerometer data. This is called internally for drive types that use accelerometer data.
- Parameters:
-
acceleration | The acceleration data. |
- (void) driveWithJoyStickPosition: |
|
(CGPoint) |
newPoint |
|
Used to update the robot heading and speed using the point from a joy stick control.
- Parameters:
-
newPoint | The new point to use to change the robot's motion. |
Uncontrolled boost to give a Sphero enough momentum to go over jumps.
Sets up the game environment. Sets up the resources needed to start controlling a robot.
Accessor to the singleton object for this class.
- Returns:
- The singleton object for this class.
Starts driving for a RKDriveControlType. This sets up the drive algorithm for the given control type. For a Core Motion based control, the updates will be started unless user disables them first.
- See also:
- RKDriveControlType
-
RKRobotControl
- Parameters:
-
type | The drive control type used to drive. |
Stops driving the robot, which includes stoping Core Motion updates as needed.
Tears down the game environment. Destroys any resources used to control a robot, and makes sure the robot is shut down properly.
Property Documentation
- (SEL) driveConversionAction [read, write, assign] |
Action to call once input coordinates are converted to speed and heading for the robot. The method signiture is
- (id) driveTarget [read, write, assign] |
Target to use for action calls
- (BOOL) driving [read, assign] |
The driving state. YES if driving, otherwise, NO
- (BOOL) handlesCoreMotionUpdates [read, write, assign] |
Property to control if Core Motion updates are handled automatically. Default value is YES.
- (CGSize) joyStickSize [read, write, assign] |
Size of the possible values used for a joy stick control
- (CMMotionManager *) motionManager [read, assign] |
Instance of the CMMotionManager used to drive the robot
The RKRobot object that is being driven
- (BOOL) showsRobotLostControlAlert [read, write, assign] |
Property to control the robot lost control alert message
- (double) stopOffset [read, write, assign] |
Value used to set a position for the stop point.
- (UIInterfaceOrientation) tiltOrientation [read, write, assign] |
Interface orientation used for tilt control
- (double) velocityScale [read, write, assign] |
Scale value between 0.0 to 1.0 that scales the velocity of the robot. Default value is 1.0.
The documentation for this class was generated from the following file: