iTS - Intelligent Traffic System
V 1.0.5
|
TS traffic A. This class is repsonsible for controlling the AI cars on the race More...
Classes | |
struct | TSBrakeSpeeds |
Public Member Functions | |
int | GetCurrentWaypoint () |
Gets the current waypoint. More... | |
string | GetCarName () |
Gets the name of the car. More... | |
float | GetLookahead_factor () |
Gets the lookahead_factor. More... | |
void | SetLookahead_factor (float Lookahead_factor) |
Sets the lookahead_factor. More... | |
delegate void | OnUpdateAIDelegate (float steering, float brake, float throttle, bool isUpSideDown) |
delegate void | GetCarSpeedDelegate (out float carSpeed) |
delegate void | OnTurnRigthDelegate (bool isTurning) |
delegate void | OnTurnLeftDelegate (bool isTurning) |
delegate void | OnCloserRangeDelegate () |
delegate void | OnFarRangeDelegate () |
float | GetLookahead () |
Gets the lookahead. More... | |
void | Enable (bool flag) |
Enable or disables the car components. More... | |
Public Attributes | |
float | maxLockaheadDistance = 0f |
The max lockahead distance. More... | |
float | maxLockaheadDistanceFullStop = 0f |
The max lockahead distance for full stop. More... | |
float | LOOKAHEAD_FACTOR = 0.33f |
The LOOKAHEA d_ FACTOR. Anticipation for turning on curves More... | |
Transform[] | frontWheels |
The front wheels. Add only the front wheels here. More... | |
float | LOOKAHEAD_CONST = 2.0f |
The LOOKAHEAD_CONST. More... | |
Rigidbody[] | bodies |
The bodies. More... | |
float | carDepth = 0.0f |
The car depth. More... | |
float | carWidth = 0.0f |
The width of the car. More... | |
float | carHeight = 0.0f |
The height of the car. More... | |
TSLaneInfo.VehicleType | myVehicleType = TSLaneInfo.VehicleType.Light |
The type of the my vehicle. More... | |
List< TSBrakeSpeeds > | brakeSpeeds = new List<TSBrakeSpeeds>() |
The brake speeds. For internal use only. More... | |
TSPoints | currenPoint = new TSPoints () |
The curren point. For internal use only. More... | |
TSLaneConnector | currentConnector = null |
The current connector. For internal use only. More... | |
TSLaneConnector | nextConnectorInstance = null |
The next connector. For internal use only. More... | |
int | previousWaypointCurve = 0 |
The previous waypoint curve. More... | |
float | segDistance = 0f |
The segment distance. This is for internal use only. More... | |
int | nextPathIndex = 0 |
The index of the next path. This is for internal use only. More... | |
int | lane = 0 |
The lane. This is for internal use only. More... | |
float | changeLaneTime = 0f |
The change lane time. This is for internal use only. More... | |
BoxCollider | playerSensor |
The player sensor. More... | |
float | playerSensorWidthMultiplier = 1.05f |
The player sensor width multiplier. More... | |
float | minPlayerSensorLenght = 5f |
The minimum player sensor lenght. More... | |
float | lengthMargin = 5f |
The lenght margin. This would be the distance to keep from the next car or pedestrian. More... | |
float | myLaneOffsetMin = 0f |
My lane offset minimum. The minimum offset that this vehicle could have, this is good to give some variation to the Vehicles position on the lane, so they don't look like they all follow exactly the same line. More... | |
float | myLaneOffsetMax = 0f |
My lane offset maximum. The maximum offset that this vehicle could have, this is good to give some variation to the Vehicles position on the lane, so they don't look like they all follow exactly the same line. More... | |
string | playerTag = "Player" |
The player tag. This would be used to compare against any object that enters the player sensor trigger to check if the car needs to react to it. More... | |
float | MAXSPEED = float.MaxValue |
The MAXSPEED. More... | |
OnFarRangeDelegate | OnFarRange |
The on far range callback. This is called if the car is in the far range. More... | |
OnCloserRangeDelegate | OnCloserRange |
The on closer range callback. This is called if the car is on the closer range. More... | |
OnTurnRigthDelegate | OnTurnRight |
The on turn right callback. More... | |
OnTurnLeftDelegate | OnTurnLeft |
The on turn left callback. More... | |
GetCarSpeedDelegate | UpdateCarSpeed |
The update car speed callback. More... | |
OnUpdateAIDelegate | OnUpdateAI |
The on update AI callback. More... | |
Properties | |
TSNavigation | NavigateToWaypoints [get] |
float | LookAheadDistance [get] |
Gets the look ahead distance. More... | |
Transform | WheelsCenter [get] |
Gets the wheels center. More... | |
float | carSpeed [get] |
Gets the car speed. More... | |
bool | IsUpSideDown [get, set] |
Gets a value indicating whether this instance is up side down. More... | |
bool | ForcedRespawn [get, set] |
Gets or sets a value indicating whether this TSTrafficAI forced respawn. More... | |
TS traffic A. This class is repsonsible for controlling the AI cars on the race
void TSTrafficAI.Enable | ( | bool | flag | ) |
Enable or disables the car components.
flag | If set to true flag. |
string TSTrafficAI.GetCarName | ( | ) |
Gets the name of the car.
int TSTrafficAI.GetCurrentWaypoint | ( | ) |
Gets the current waypoint.
float TSTrafficAI.GetLookahead | ( | ) |
Gets the lookahead.
float TSTrafficAI.GetLookahead_factor | ( | ) |
Gets the lookahead_factor.
void TSTrafficAI.SetLookahead_factor | ( | float | Lookahead_factor | ) |
Sets the lookahead_factor.
Lookahead_factor | Lookahead_factor. |
Rigidbody [] TSTrafficAI.bodies |
The bodies.
List<TSBrakeSpeeds> TSTrafficAI.brakeSpeeds = new List<TSBrakeSpeeds>() |
The brake speeds. For internal use only.
float TSTrafficAI.carDepth = 0.0f |
The car depth.
float TSTrafficAI.carHeight = 0.0f |
The height of the car.
float TSTrafficAI.carWidth = 0.0f |
The width of the car.
float TSTrafficAI.changeLaneTime = 0f |
The change lane time. This is for internal use only.
TSLaneConnector TSTrafficAI.currentConnector = null |
The current connector. For internal use only.
Transform [] TSTrafficAI.frontWheels |
The front wheels. Add only the front wheels here.
int TSTrafficAI.lane = 0 |
The lane. This is for internal use only.
float TSTrafficAI.lengthMargin = 5f |
The lenght margin. This would be the distance to keep from the next car or pedestrian.
float TSTrafficAI.LOOKAHEAD_CONST = 2.0f |
The LOOKAHEAD_CONST.
float TSTrafficAI.LOOKAHEAD_FACTOR = 0.33f |
The LOOKAHEA d_ FACTOR. Anticipation for turning on curves
float TSTrafficAI.maxLockaheadDistance = 0f |
The max lockahead distance.
float TSTrafficAI.maxLockaheadDistanceFullStop = 0f |
The max lockahead distance for full stop.
float TSTrafficAI.MAXSPEED = float.MaxValue |
The MAXSPEED.
float TSTrafficAI.minPlayerSensorLenght = 5f |
The minimum player sensor lenght.
float TSTrafficAI.myLaneOffsetMax = 0f |
My lane offset maximum. The maximum offset that this vehicle could have, this is good to give some variation to the Vehicles position on the lane, so they don't look like they all follow exactly the same line.
float TSTrafficAI.myLaneOffsetMin = 0f |
My lane offset minimum. The minimum offset that this vehicle could have, this is good to give some variation to the Vehicles position on the lane, so they don't look like they all follow exactly the same line.
TSLaneInfo.VehicleType TSTrafficAI.myVehicleType = TSLaneInfo.VehicleType.Light |
The type of the my vehicle.
TSLaneConnector TSTrafficAI.nextConnectorInstance = null |
The next connector. For internal use only.
int TSTrafficAI.nextPathIndex = 0 |
The index of the next path. This is for internal use only.
OnCloserRangeDelegate TSTrafficAI.OnCloserRange |
The on closer range callback. This is called if the car is on the closer range.
OnFarRangeDelegate TSTrafficAI.OnFarRange |
The on far range callback. This is called if the car is in the far range.
OnTurnLeftDelegate TSTrafficAI.OnTurnLeft |
The on turn left callback.
OnTurnRigthDelegate TSTrafficAI.OnTurnRight |
The on turn right callback.
OnUpdateAIDelegate TSTrafficAI.OnUpdateAI |
The on update AI callback.
BoxCollider TSTrafficAI.playerSensor |
The player sensor.
float TSTrafficAI.playerSensorWidthMultiplier = 1.05f |
The player sensor width multiplier.
string TSTrafficAI.playerTag = "Player" |
The player tag. This would be used to compare against any object that enters the player sensor trigger to check if the car needs to react to it.
int TSTrafficAI.previousWaypointCurve = 0 |
The previous waypoint curve.
float TSTrafficAI.segDistance = 0f |
The segment distance. This is for internal use only.
GetCarSpeedDelegate TSTrafficAI.UpdateCarSpeed |
The update car speed callback.
|
get |
Gets the car speed.
The car speed.
|
getset |
Gets or sets a value indicating whether this TSTrafficAI forced respawn.
true
if forced respawn; otherwise, false
.
|
getset |
Gets a value indicating whether this instance is up side down.
true
if this instance is up side down; otherwise, false
.
|
get |
Gets the look ahead distance.
The look ahead distance.
|
get |
Gets the wheels center.
The wheels center.