VehicleSpawner

Members

Member

Description

gameObject

lastSpawnedVehicle

The vehicle that was last spawned by the spawner

lastSpawnedVehicleHasBeenUsed

Has the last spawned vehicle been used?

parentSpawnPoint

spawnType

transform

Methods

Method

Description

GetPrefab()

Get the active vehicle prefab of this spawner.

GetPrefabVehicle()

SpawnIsBlocked()

Returns true if the spawn is currently blocked.

SpawnNow()

Force spawns the active vehicle type.

ToString()

Static methods

Method

Description

GetPrefab(team, type)

Get the vehicle prefab for the specified team and type.

SpawnVehicle(team, type, position, rotation)

Spawns a vehicle of the specified type

Details

class VehicleSpawner
const GameObject gameObject
const Vehicle lastSpawnedVehicle

The vehicle that was last spawned by the spawner

const bool lastSpawnedVehicleHasBeenUsed

Has the last spawned vehicle been used?

SpawnPoint parentSpawnPoint
const VehicleSpawnType spawnType
const Transform transform
GameObject GetPrefab()

Get the active vehicle prefab of this spawner. Please note that the current value depends on which team owns the spawner’s parent spawn point.

Vehicle GetPrefabVehicle()
bool SpawnIsBlocked()

Returns true if the spawn is currently blocked.

Vehicle SpawnNow()

Force spawns the active vehicle type. Does not check if the spawn area is clear or if the previous vehicle is still alive.

string ToString()
static GameObject GetPrefab(Team team, VehicleSpawnType type)

Get the vehicle prefab for the specified team and type.

static Vehicle SpawnVehicle(Team team, VehicleSpawnType type, Vector3 position, Quaternion rotation)

Spawns a vehicle of the specified type