iTS - Intelligent Traffic System  V 1.0.5
 All Classes Functions Variables Properties
TSTrafficSpawner Class Reference
Inheritance diagram for TSTrafficSpawner:

Classes

struct  PointsIndex
 
class  TSSpawnVehicles
 

Public Member Functions

void Close ()
 Close any threads if any. More...
 

Public Attributes

TSSpawnVehicles[] cars
 The cars. This is the array that contains the source traffic cars that would be used to spawn on the scene. More...
 
int amount = 50
 The amount of cars that would be on the scene. This is the maximum amount of cars on the scene at the same time. More...
 
float maxDistance = 150f
 The max distance from the spawner object the cars are spawned into, if the traffic cars are farther from this distance the cars would be disabled and respawned within this distance More...
 
float offset = 140f
 The offset. This is the offset to make the area for spawning cars, it is the max distance minus this offset what makes the spawning area or radius More...
 
float closerRange = 25f
 The closer range. This is to make a callback triggered when the traffic car or pedestrians is near the spawning object from certain distance, usefull to activate other stuff on the traffic car or AI More...
 
float refreshTime = 0.02f
 The refresh time for spawning cars. More...
 
TSMainManager manager
 The manager system which contains all the lanes info. More...
 
Vector3 unusedCarsPosition = new Vector3 (50000, 50000, 50000)
 The unused cars position. More...
 
bool respawnIfUpSideDown = false
 The respawn if flipped. More...
 
float respawnUpSideDownTime = 2f
 The respawn up side down timer. More...
 
bool disableMultiThreading = false
 The disbale multi threading. More...
 

Static Public Attributes

static TSTrafficSpawner mainInstance
 

Properties

float MaxDistance [get, set]
 Gets or sets the max distance. Use this for changing the spawner max distance at runtime by script, since this distance is converted into square distance for better performance calculations. More...
 
float Offset [get, set]
 Gets or sets the offset. Use this for changing the spawner offset at runtime by script, since this offset is used to talculate the min distance in squared values for better perfomance calculations. More...
 
TSTrafficAI[] TrafficCars [get]
 Gets the traffic cars. More...
 
int totalFarCars [get]
 Gets the total far cars. More...
 
Transform[] TrafficCarsTransform [get]
 Gets the traffic cars transform. More...
 
Vector3[] TrafficCarsPositions [get]
 Gets the traffic cars positions. More...
 
static float RespawnUpSideDownTime [get]
 
int Amount [get, set]
 Gets or sets the amount. More...
 

Member Function Documentation

void TSTrafficSpawner.Close ( )

Close any threads if any.

Member Data Documentation

int TSTrafficSpawner.amount = 50

The amount of cars that would be on the scene. This is the maximum amount of cars on the scene at the same time.

TSSpawnVehicles [] TSTrafficSpawner.cars

The cars. This is the array that contains the source traffic cars that would be used to spawn on the scene.

float TSTrafficSpawner.closerRange = 25f

The closer range. This is to make a callback triggered when the traffic car or pedestrians is near the spawning object from certain distance, usefull to activate other stuff on the traffic car or AI

bool TSTrafficSpawner.disableMultiThreading = false

The disbale multi threading.

TSMainManager TSTrafficSpawner.manager

The manager system which contains all the lanes info.

float TSTrafficSpawner.maxDistance = 150f

The max distance from the spawner object the cars are spawned into, if the traffic cars are farther from this distance the cars would be disabled and respawned within this distance

float TSTrafficSpawner.offset = 140f

The offset. This is the offset to make the area for spawning cars, it is the max distance minus this offset what makes the spawning area or radius

float TSTrafficSpawner.refreshTime = 0.02f

The refresh time for spawning cars.

bool TSTrafficSpawner.respawnIfUpSideDown = false

The respawn if flipped.

float TSTrafficSpawner.respawnUpSideDownTime = 2f

The respawn up side down timer.

Vector3 TSTrafficSpawner.unusedCarsPosition = new Vector3 (50000, 50000, 50000)

The unused cars position.

Property Documentation

int TSTrafficSpawner.Amount
getset

Gets or sets the amount.

The amount.

float TSTrafficSpawner.MaxDistance
getset

Gets or sets the max distance. Use this for changing the spawner max distance at runtime by script, since this distance is converted into square distance for better performance calculations.

The max distance.

float TSTrafficSpawner.Offset
getset

Gets or sets the offset. Use this for changing the spawner offset at runtime by script, since this offset is used to talculate the min distance in squared values for better perfomance calculations.

The offset.

int TSTrafficSpawner.totalFarCars
get

Gets the total far cars.

The total far cars.

TSTrafficAI [] TSTrafficSpawner.TrafficCars
get

Gets the traffic cars.

The traffic cars.

Vector3 [] TSTrafficSpawner.TrafficCarsPositions
get

Gets the traffic cars positions.

The traffic cars positions.

Transform [] TSTrafficSpawner.TrafficCarsTransform
get

Gets the traffic cars transform.

The traffic cars transform.