|
| virtual GameObject | Spawn (Vector3 spawnPosition, bool triggerObjectActivation=true) |
| | Spawns a new object and positions/resizes it.
|
|
| Vector3 | MinimumSize = new Vector3(1, 1, 1) |
| | the minimum size of a spawned object
|
| Vector3 | MaximumSize = new Vector3(1, 1, 1) |
| | the maximum size of a spawned object
|
| bool | PreserveRatio = false |
| | if set to true, the random size will preserve the original's aspect ratio
|
| Vector3 | MinimumRotation |
| | the minimum size of a spawned object
|
| Vector3 | MaximumRotation |
| | the maximum size of a spawned object
|
| bool | Spawning = true |
| | if true, the spawner can spawn, if not, it won't spawn
|
| bool | OnlySpawnWhileGameInProgress = true |
| | if true, only spawn objects while the game is in progress
|
| float | InitialDelay = 0f |
| | Initial delay before the first spawn, in seconds.
|
|
| virtual void | Awake () |
| | On awake, we get the objectPooler component.
|
◆ Awake()
| virtual void MoreMountains.InfiniteRunnerEngine.Spawner.Awake |
( |
| ) |
|
|
protectedvirtual |
On awake, we get the objectPooler component.
◆ Spawn()
| virtual GameObject MoreMountains.InfiniteRunnerEngine.Spawner.Spawn |
( |
Vector3 | spawnPosition, |
|
|
bool | triggerObjectActivation = true ) |
|
virtual |
Spawns a new object and positions/resizes it.
we get the next object in the pool and make sure it's not null
we rescale the object
◆ _objectPooler
| MMObjectPooler MoreMountains.InfiniteRunnerEngine.Spawner._objectPooler |
|
protected |
◆ _startTime
| float MoreMountains.InfiniteRunnerEngine.Spawner._startTime |
|
protected |
◆ InitialDelay
| float MoreMountains.InfiniteRunnerEngine.Spawner.InitialDelay = 0f |
Initial delay before the first spawn, in seconds.
◆ MaximumRotation
| Vector3 MoreMountains.InfiniteRunnerEngine.Spawner.MaximumRotation |
the maximum size of a spawned object
◆ MaximumSize
| Vector3 MoreMountains.InfiniteRunnerEngine.Spawner.MaximumSize = new Vector3(1, 1, 1) |
the maximum size of a spawned object
◆ MinimumRotation
| Vector3 MoreMountains.InfiniteRunnerEngine.Spawner.MinimumRotation |
the minimum size of a spawned object
◆ MinimumSize
| Vector3 MoreMountains.InfiniteRunnerEngine.Spawner.MinimumSize = new Vector3(1, 1, 1) |
the minimum size of a spawned object
◆ OnlySpawnWhileGameInProgress
| bool MoreMountains.InfiniteRunnerEngine.Spawner.OnlySpawnWhileGameInProgress = true |
if true, only spawn objects while the game is in progress
◆ PreserveRatio
| bool MoreMountains.InfiniteRunnerEngine.Spawner.PreserveRatio = false |
if set to true, the random size will preserve the original's aspect ratio
◆ Spawning
| bool MoreMountains.InfiniteRunnerEngine.Spawner.Spawning = true |
if true, the spawner can spawn, if not, it won't spawn
The documentation for this class was generated from the following file:
- Assets/InfiniteRunnerEngine/Common/Scripts/Spawner/Spawner.cs