Highroad Engine v1.3
|
Base class controller. Must be used by vehicles specific controllers. Manages Score and input management. More...
Public Member Functions | |
virtual bool | HasJustFinished (int finalRankPosition) |
Gets a value indicating whether this vehicle has just finished the race. This property will return true only once. More... | |
virtual void | MainActionPressed () |
Button Main Action is being pressed More... | |
virtual void | MainActionDown () |
Button Main Action is pressed down More... | |
virtual void | MainActionReleased () |
Button Main Action is released More... | |
virtual void | AltActionPressed () |
Button Alt Action is being pressed More... | |
virtual void | AltActionDown () |
Button Alt Action is pressed down More... | |
virtual void | AltActionReleased () |
Button Alt Action is released More... | |
virtual void | RespawnActionPressed () |
Button Respawn Action is being pressed More... | |
virtual void | RespawnActionDown () |
Button Respawn Action is pressed down More... | |
virtual void | RespawnActionReleased () |
Button Respawn Action is released More... | |
virtual void | LeftPressed () |
Button Left is being pressed More... | |
virtual void | RightPressed () |
Button Right is being pressed More... | |
virtual void | UpPressed () |
Button Up is being pressed More... | |
virtual void | DownPressed () |
Button Down is being pressed More... | |
virtual void | MobileJoystickPosition (Vector2 value) |
Update of the mobile joystick position More... | |
virtual void | HorizontalPosition (float value) |
Update of the horizontal value (from -1 to 1) More... | |
virtual void | VerticalPosition (float value) |
Update of the vertical value (from -1 to 1) More... | |
virtual void | LeftReleased () |
Button Left is released More... | |
virtual void | RightReleased () |
Button Right is released More... | |
virtual void | UpReleased () |
Button Up is released More... | |
virtual void | DownReleased () |
Button Down is released More... | |
virtual void | Respawn () |
This method triggers the respawn of the vehicle to its last checkpoint More... | |
virtual void | OnTriggerEnter (Collider other) |
Describes what happens when the object starts colliding with something Used for checkpoint interaction More... | |
virtual void | OnTriggerStay (Collider other) |
Describes what happens when something is colliding with our object Used to apply a boost force to the vehicle while staying in a boost zone. More... | |
virtual void | OnTriggerExit (Collider other) |
Describes what happens when the collision ends Removes "boost" state when the vehicle exits a boost zone More... | |
virtual void | EnableControls (int controllerId) |
Enables the controls. More... | |
virtual void | DisableControls () |
Disables the controls. More... | |
Public Attributes | |
float | BoostForce = 1f |
the force applied when the vehicle is in a boost zone More... | |
float | RigidBodyDragInLoop = 1f |
The temporary value of rigidbody.drag when the vehicle is inside a loop zone. This allows for better movement inside the loop. More... | |
float | SteeringSpeed = 100f |
the speed at which the car steers More... | |
bool | AutoForward = false |
Set this to true if you want the vehicle to accelerate forever. More... | |
Protected Types | |
enum | Zones { SpeedBoost , JumpBoost , LoopZone } |
Protected Member Functions | |
virtual void | Awake () |
Initializes various references More... | |
virtual void | Start () |
Initializes checkpoints More... | |
Protected Attributes | |
Rigidbody | _rigidbody |
Collider | _collider |
RaceManager | _raceManager |
Transform[] | _checkpoints |
int | _currentWaypoint = 0 |
int | _lastWaypointCrossed = -1 |
float | _defaultDrag |
int | _controllerId = -1 |
int | _finisherPosition = 0 |
Ẁhen > 0, vehicle has finished the race. This is it final rank. More... | |
float | _currentGasPedalAmount |
Properties | |
int | CurrentLap [getprotected set] |
Returns the current lap. More... | |
float | CurrentSteeringAmount [getset] |
Gets or sets the current steering amount from -1 (full left) to 1 (full right). 0 when none. More... | |
float? | CurrentGasPedalAmount [getset] |
Gets or sets the current gas pedal amount. 1 for full acceleration. -1 for full brake or reverse. 0 for nothing. More... | |
virtual bool | IsPlaying [getprotected set] |
Gets or sets a value indicating whether this user is playing. More... | |
virtual bool | IsGrounded [getprotected set] |
Gets or sets a value indicating whether this instance is grounded. More... | |
virtual bool | IsOnSpeedBoost [getprotected set] |
Gets or sets a value indicating whether this instance is on speed boost. More... | |
virtual float | Speed [get] |
Gets the vehicle speed. More... | |
virtual int | Score [get] |
Gets the player score. More... | |
virtual float | DistanceToNextWaypoint [get] |
Gets the distance to the next waypoint. More... | |
int | FinalRank [get] |
Gets the final rank. 0 if vehicle has not ended. More... | |
Base class controller. Must be used by vehicles specific controllers. Manages Score and input management.
|
protected |
|
virtual |
Button Alt Action is pressed down
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Alt Action is being pressed
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Alt Action is released
Implements MoreMountains.HighroadEngine.IActorInput.
|
protectedvirtual |
Initializes various references
Reimplemented in MoreMountains.HighroadEngine.SolidController, and MoreMountains.HighroadEngine.CarController.
|
virtual |
Disables the controls.
|
virtual |
Button Down is being pressed
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Down is released
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Enables the controls.
controllerId | Controller identifier. |
|
virtual |
Gets a value indicating whether this vehicle has just finished the race. This property will return true only once.
finalRankPosition | The rank of this vehicle when going throught endline. This value will be stored and can be returned by FinalRank propery. |
true
if this vehicle has finished; otherwise, false
.
|
virtual |
Update of the horizontal value (from -1 to 1)
value | Value. |
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Left is being pressed
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Left is released
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Main Action is pressed down
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Main Action is being pressed
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Main Action is released
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Update of the mobile joystick position
value | Value. |
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Describes what happens when the object starts colliding with something Used for checkpoint interaction
other | Other. |
|
virtual |
Describes what happens when the collision ends Removes "boost" state when the vehicle exits a boost zone
other | Other. |
|
virtual |
Describes what happens when something is colliding with our object Used to apply a boost force to the vehicle while staying in a boost zone.
other | Other. |
|
virtual |
This method triggers the respawn of the vehicle to its last checkpoint
Reimplemented in MoreMountains.HighroadEngine.SolidController.
|
virtual |
Button Respawn Action is pressed down
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Respawn Action is being pressed
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Respawn Action is released
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Right is being pressed
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Right is released
Implements MoreMountains.HighroadEngine.IActorInput.
|
protectedvirtual |
Initializes checkpoints
Reimplemented in MoreMountains.HighroadEngine.SolidController.
|
virtual |
Button Up is being pressed
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Button Up is released
Implements MoreMountains.HighroadEngine.IActorInput.
|
virtual |
Update of the vertical value (from -1 to 1)
value | Value. |
Implements MoreMountains.HighroadEngine.IActorInput.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Ẁhen > 0, vehicle has finished the race. This is it final rank.
|
protected |
|
protected |
|
protected |
bool MoreMountains.HighroadEngine.BaseController.AutoForward = false |
Set this to true if you want the vehicle to accelerate forever.
float MoreMountains.HighroadEngine.BaseController.BoostForce = 1f |
the force applied when the vehicle is in a boost zone
float MoreMountains.HighroadEngine.BaseController.RigidBodyDragInLoop = 1f |
The temporary value of rigidbody.drag when the vehicle is inside a loop zone. This allows for better movement inside the loop.
float MoreMountains.HighroadEngine.BaseController.SteeringSpeed = 100f |
the speed at which the car steers
|
getset |
Gets or sets the current gas pedal amount. 1 for full acceleration. -1 for full brake or reverse. 0 for nothing.
The current gas pedal amount.
|
getprotected set |
Returns the current lap.
|
getset |
Gets or sets the current steering amount from -1 (full left) to 1 (full right). 0 when none.
The current steering amount.
|
get |
Gets the distance to the next waypoint.
The distance to next waypoint.
|
get |
Gets the final rank. 0 if vehicle has not ended.
The final rank.
|
getprotected set |
Gets or sets a value indicating whether this instance is grounded.
true
if this instance is grounded; otherwise, false
.
|
getprotected set |
Gets or sets a value indicating whether this instance is on speed boost.
true
if this instance is on speed boost; otherwise, false
.
|
getprotected set |
Gets or sets a value indicating whether this user is playing.
true
if this instance is playing; otherwise, false
.
|
get |
Gets the player score.
The score.
|
get |
Gets the vehicle speed.
The speed.