Infinite Runner Engine v1.9
|
Spawns and positions/resizes objects based on the distance traveled More...
Public Attributes | |
float | SpawnDistanceFromPlayer |
the x distance we spawn the player at More... | |
Vector3 | MinimumSpacing = Vector3.zero |
Vector3 | MaximumSpacing = Vector3.zero |
Public Attributes inherited from MoreMountains.InfiniteRunnerEngine.Spawner | |
Vector3 | MinimumSize =new Vector3(1,1,1) |
the minimum size of a spawned object More... | |
Vector3 | MaximumSize =new Vector3(1,1,1) |
the maximum size of a spawned object More... | |
bool | PreserveRatio =false |
if set to true, the random size will preserve the original's aspect ratio More... | |
Vector3 | MinimumRotation |
the minimum size of a spawned object More... | |
Vector3 | MaximumRotation |
the maximum size of a spawned object More... | |
bool | Spawning =true |
if true, the spawner can spawn, if not, it won't spawn More... | |
bool | OnlySpawnWhileGameInProgress = true |
if true, only spawn objects while the game is in progress More... | |
float | InitialDelay =0f |
Initial delay before the first spawn, in seconds. More... | |
Protected Member Functions | |
virtual void | Start () |
Triggered at the start of the level More... | |
virtual void | FirstSpawn () |
virtual void | FixedUpdate () |
Triggered every frame More... | |
virtual void | LinkedSpawn (Vector3 spawnPosition) |
Spawns an object at the specified position and determines the next spawn position More... | |
Protected Member Functions inherited from MoreMountains.InfiniteRunnerEngine.Spawner | |
virtual void | Awake () |
On awake, we get the objectPooler component More... | |
Protected Attributes | |
LinkedSpawnedObject | _lastLinkedSpawnedObject |
Transform | _lastSpawnedTransform |
float | _nextSpawnDistance |
Protected Attributes inherited from MoreMountains.InfiniteRunnerEngine.Spawner | |
MMObjectPooler | _objectPooler |
float | _startTime |
Additional Inherited Members | |
Public Member Functions inherited from MoreMountains.InfiniteRunnerEngine.Spawner | |
virtual GameObject | Spawn (Vector3 spawnPosition, bool triggerObjectActivation=true) |
Spawns a new object and positions/resizes it More... | |
Spawns and positions/resizes objects based on the distance traveled
|
protectedvirtual |
we define the initial spawn position
|
protectedvirtual |
Triggered every frame
if we've reached the next spawn position, we spawn a new object
we reposition the object
|
protectedvirtual |
Spawns an object at the specified position and determines the next spawn position
spawnPosition | Spawn position. |
|
protectedvirtual |
Triggered at the start of the level
we get the object pooler component
|
protected |
|
protected |
|
protected |
Vector3 MoreMountains.InfiniteRunnerEngine.LinkedSpawner.MaximumSpacing = Vector3.zero |
Vector3 MoreMountains.InfiniteRunnerEngine.LinkedSpawner.MinimumSpacing = Vector3.zero |
float MoreMountains.InfiniteRunnerEngine.LinkedSpawner.SpawnDistanceFromPlayer |
the x distance we spawn the player at