Humanoid Control for Unity v4
|
Component for spawning objects.
Public Types | |
enum | SpawnMethod { SinglePlayer , Random , RoundRobin } |
Spawning methods. More... | |
Public Member Functions | |
virtual GameObject | SpawnObject () |
Spawn one GameObject using the Spawner settings. | |
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 | |
virtual void | OnEnable () |
virtual void | Start () |
SpawnPoint | ChooseSpawnPoint (SpawnPoint[] spawnPoints, SpawnMethod spawnMethod) |
Protected Attributes | |
int | spawnIndex = 0 |
|
virtual |
Spawn one GameObject using the Spawner settings.
Reimplemented in Passer.Humanoid.HumanoidSpawner.
|
virtual |
Spawn a GameObject.
prefab | The GameObject prefab to spawn. |
|
virtual |
Spawn a GameObject.
prefab | The GameObject prefab to spawn. |
spawnPoints | The array of possible spawn points. |
spawnMethod | The SpawnMethod to use for spawning. |
SpawnPoint [] Passer.Spawner.spawnPoints |
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
bool Passer.Spawner.singleInstance |
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