Humanoid Control for Unity v4
|
Component for spawning humanoids.
Public Types | |
enum | SpawnMethod { SinglePlayer , Random , RoundRobin } |
Spawning methods. More... | |
Public Member Functions | |
override GameObject | SpawnObject () |
Spawn one humanoid using the HumanoidSpawner settings. | |
virtual HumanoidControl | SpawnHumanoid () |
Spawn one humanoid using the HumanoidSpawner settings. | |
virtual HumanoidControl | Spawn (HumanoidControl humanoidPrefab) |
Spawn a humanoid. | |
HumanoidControl | Spawn (HumanoidControl humanoidPrefab, SpawnPoint[] spawnPoints, SpawnMethod spawnMethod=SpawnMethod.RoundRobin) |
Spawn a humanoid. | |
void | DoSpawn (GameObject prefab) |
virtual GameObject | Spawn (GameObject prefab) |
Spawn a GameObject. | |
virtual GameObject | Spawn (GameObject prefab, SpawnPoint[] spawnPoints, SpawnMethod spawnMethod=SpawnMethod.RoundRobin) |
Spawn a GameObject. | |
Static Public Member Functions | |
static GameObject | Spawn (GameObject prefab, Vector3 position, Quaternion rotation) |
Public Attributes | |
GameObject | prefab |
The prefab which will be spawned. | |
SpawnPoint[] | spawnPoints |
The available SpawnPoints. | |
SpawnMethod | spawnMethod |
The SpawnMethod to use for spawning the humanoids. | |
bool | spawnAtStart |
Spawn an object when the scene starts. | |
bool | singleInstance |
Will spawn only one object for this prefab. | |
Protected Member Functions | |
override void | Start () |
int | FindSpawnPointIndex () |
void | DestroyHumanoid (HumanoidControl humanoid) |
virtual void | OnEnable () |
SpawnPoint | ChooseSpawnPoint (SpawnPoint[] spawnPoints, SpawnMethod spawnMethod) |
Static Protected Member Functions | |
static HumanoidControl | AddHumanoidToAvatar (GameObject avatar) |
Protected Attributes | |
HumanoidControl[] | spawnedHumanoids |
int | spawnIndex = 0 |
Static Protected Attributes | |
static int | nHumanoids |
|
inherited |
|
protectedvirtual |
Reimplemented from Passer.Spawner.
|
virtual |
Spawn one humanoid using the HumanoidSpawner settings.
Reimplemented from Passer.Spawner.
|
virtual |
Spawn one humanoid using the HumanoidSpawner settings.
|
virtual |
Spawn a humanoid.
prefab | The humanoid prefab to spawn. |
HumanoidControl Passer.Humanoid.HumanoidSpawner.Spawn | ( | HumanoidControl | humanoidPrefab, |
SpawnPoint[] | spawnPoints, | ||
SpawnMethod | spawnMethod = SpawnMethod::RoundRobin |
||
) |
Spawn a humanoid.
humanoidPrefab | The humanoid prefab to spawn. |
spawnPoints | The array of possible spawn points. |
spawnMethod | The SpawnMethod to use for spawning. |
|
virtualinherited |
Spawn a GameObject.
prefab | The GameObject prefab to spawn. |
|
virtualinherited |
Spawn a GameObject.
prefab | The GameObject prefab to spawn. |
spawnPoints | The array of possible spawn points. |
spawnMethod | The SpawnMethod to use for spawning. |
|
inherited |
The available SpawnPoints.
When the list is empty, the scene will be searched for available spawn points when it becomes enabled. If no spawn points can be found, this transform will be used as a SpawnPoint
|
inherited |
Will spawn only one object for this prefab.
When spawn is called a second time for the same prefab, the original spawned object will be teleported to the new spawn point