iRDS - Intelligent Race Driver System  V 2.1.0.5
 All Classes Namespaces Functions Variables Properties Events
IRDSPlaceCars Class Reference
Inheritance diagram for IRDSPlaceCars:

Public Member Functions

Transform GetGridPositions ()
 Gets the grid positions. More...
 
void RestartRaceAutoPositionCarsOnGrid ()
 
IRDSCarControllerAI AddNewPlayerCar (Object car, IRDSOtherPlayers controls, string driverName)
 Add a new player car to the scene, the car is instantiated by this method on the next empty grid point More...
 
IRDSCarControllerAI AddNewPlayerCar (IRDSCarControllerAI player, IRDSOtherPlayers controls, string driverName)
 Add a new player car to the scene, the car needs to be already instantiated More...
 
IRDSCarControllerAI AddNewAICar (Object car, Color carColor, string driverName, params DriversSettings[] specificDriverSetting)
 Add a new AI car to the scene, the car is instantiated by this method on the next empty grid point More...
 
IRDSCarControllerAI AddNewAICar (IRDSCarControllerAI AI, Color carColor, string driverName, params DriversSettings[] specificDriverSetting)
 Add a new AI car to the scene, the car needs to be already instantiated. More...
 
IRDSCarControllerAI AddNewObstacle (Object car, bool hitMe, Vector3 position, Quaternion rotation)
 Adds the new obstacle. More...
 
IRDSCarControllerAI AddNewObstacle (Object car, bool hitMe, Vector3 position, Vector3 rotation)
 Adds the new obstacle. More...
 
IRDSCarControllerAI AddNewCar (Object car, bool isAI)
 
bool RemoveCar (IRDSCarControllerAI car)
 Removes the car and destroys it. More...
 
bool RemoveCar (IRDSCarControllerAI car, bool destroy)
 Removes the car, and optionally destroys it. More...
 
bool RegisterNewCar (IRDSCarControllerAI car, bool isNetworkCar)
 Registers the new car. This function is useful for registering cars instantiated by the Newtwork framework for multiplayer network games. More...
 

Static Public Member Functions

static void PlayerControlsAsigment (ref IRDSPlayerControls playercontrols, IRDSControlAsigment controlAsigments)
 Assigns the controls to the Player. More...
 

Properties

static IRDSPlaceCars instance [get]
 Gets the main instance. More...
 

Member Function Documentation

IRDSCarControllerAI IRDSPlaceCars.AddNewAICar ( Object  car,
Color  carColor,
string  driverName,
params DriversSettings[]  specificDriverSetting 
)

Add a new AI car to the scene, the car is instantiated by this method on the next empty grid point

Returns
The new AI car.
Parameters
carThe prefab of the car that we want to instantiate.
carColorThe color of the car.
driverNameThe name of this new AI driver.
specificDriverSettingSpecific driver setting (optional).
IRDSCarControllerAI IRDSPlaceCars.AddNewAICar ( IRDSCarControllerAI  AI,
Color  carColor,
string  driverName,
params DriversSettings[]  specificDriverSetting 
)

Add a new AI car to the scene, the car needs to be already instantiated.

Returns
The new AI car.
Parameters
AIThe instance of the new car IRDSCarControllerAI Class.
carColorThe color of the car.
driverNameThe name of this new AI driver.
specificDriverSettingSpecific driver setting (optional).
IRDSCarControllerAI IRDSPlaceCars.AddNewObstacle ( Object  car,
bool  hitMe,
Vector3  position,
Quaternion  rotation 
)

Adds the new obstacle.

Returns
The new obstacle.
Parameters
carCar.
hitMeIf set to true hit me.
positionPosition.
rotationRotation.
IRDSCarControllerAI IRDSPlaceCars.AddNewObstacle ( Object  car,
bool  hitMe,
Vector3  position,
Vector3  rotation 
)

Adds the new obstacle.

Returns
The new obstacle.
Parameters
carCar.
hitMeIf set to true hit me.
positionPosition.
rotationRotation.
IRDSCarControllerAI IRDSPlaceCars.AddNewPlayerCar ( Object  car,
IRDSOtherPlayers  controls,
string  driverName 
)

Add a new player car to the scene, the car is instantiated by this method on the next empty grid point

Parameters
carThe prefab of the car that we want to instantiate.
controlsThe controls that would be assigned to this new player car
driverNameThe name of this new player
IRDSCarControllerAI IRDSPlaceCars.AddNewPlayerCar ( IRDSCarControllerAI  player,
IRDSOtherPlayers  controls,
string  driverName 
)

Add a new player car to the scene, the car needs to be already instantiated

Parameters
AIThe instance of the new car IRDSCarControllerAI Class.
controlsThe controls that would be assigned to this new player car
driverNameThe name of this new player
Transform IRDSPlaceCars.GetGridPositions ( )

Gets the grid positions.

Returns
The grid positions.
static void IRDSPlaceCars.PlayerControlsAsigment ( ref IRDSPlayerControls  playercontrols,
IRDSControlAsigment  controlAsigments 
)
static

Assigns the controls to the Player.

Parameters
playercontrolsPlayercontrols.
controlAsigmentsControl asigments.
bool IRDSPlaceCars.RegisterNewCar ( IRDSCarControllerAI  car,
bool  isNetworkCar 
)

Registers the new car. This function is useful for registering cars instantiated by the Newtwork framework for multiplayer network games.

Parameters
carCar.
isNetworkCarIf set to true is network car.
bool IRDSPlaceCars.RemoveCar ( IRDSCarControllerAI  car)

Removes the car and destroys it.

Returns
true, if car was removed, false otherwise.
Parameters
carCar.
bool IRDSPlaceCars.RemoveCar ( IRDSCarControllerAI  car,
bool  destroy 
)

Removes the car, and optionally destroys it.

Returns
true, if car was removed, false otherwise.
Parameters
carCar.
destroyIf set to true destroy.

Property Documentation

IRDSPlaceCars IRDSPlaceCars.instance
staticget

Gets the main instance.

The main instance.