Infinite Runner Engine v1.9
Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.InfiniteRunnerEngine.LinkedSpawner Class Reference

Spawns and positions/resizes objects based on the distance traveled More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.LinkedSpawner:
MoreMountains.InfiniteRunnerEngine.Spawner

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...
 

Detailed Description

Spawns and positions/resizes objects based on the distance traveled

Member Function Documentation

◆ FirstSpawn()

virtual void MoreMountains.InfiniteRunnerEngine.LinkedSpawner.FirstSpawn ( )
protectedvirtual

we define the initial spawn position

◆ FixedUpdate()

virtual void MoreMountains.InfiniteRunnerEngine.LinkedSpawner.FixedUpdate ( )
protectedvirtual

Triggered every frame

if we've reached the next spawn position, we spawn a new object

we reposition the object

◆ LinkedSpawn()

virtual void MoreMountains.InfiniteRunnerEngine.LinkedSpawner.LinkedSpawn ( Vector3  spawnPosition)
protectedvirtual

Spawns an object at the specified position and determines the next spawn position

Parameters
spawnPositionSpawn position.

◆ Start()

virtual void MoreMountains.InfiniteRunnerEngine.LinkedSpawner.Start ( )
protectedvirtual

Triggered at the start of the level

we get the object pooler component

Member Data Documentation

◆ _lastLinkedSpawnedObject

LinkedSpawnedObject MoreMountains.InfiniteRunnerEngine.LinkedSpawner._lastLinkedSpawnedObject
protected

◆ _lastSpawnedTransform

Transform MoreMountains.InfiniteRunnerEngine.LinkedSpawner._lastSpawnedTransform
protected

◆ _nextSpawnDistance

float MoreMountains.InfiniteRunnerEngine.LinkedSpawner._nextSpawnDistance
protected

◆ MaximumSpacing

Vector3 MoreMountains.InfiniteRunnerEngine.LinkedSpawner.MaximumSpacing = Vector3.zero

◆ MinimumSpacing

Vector3 MoreMountains.InfiniteRunnerEngine.LinkedSpawner.MinimumSpacing = Vector3.zero

◆ SpawnDistanceFromPlayer

float MoreMountains.InfiniteRunnerEngine.LinkedSpawner.SpawnDistanceFromPlayer

the x distance we spawn the player at


The documentation for this class was generated from the following file: