Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.InfiniteRunnerEngine.Spawner Class Reference
Inheritance diagram for MoreMountains.InfiniteRunnerEngine.Spawner:
MoreMountains.InfiniteRunnerEngine.DistanceSpawner MoreMountains.InfiniteRunnerEngine.LinkedSpawner MoreMountains.InfiniteRunnerEngine.TimedSpawner

Public Member Functions

virtual GameObject Spawn (Vector3 spawnPosition, bool triggerObjectActivation=true)
 Spawns a new object and positions/resizes it More...
 

Public Attributes

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 Awake ()
 On awake, we get the objectPooler component More...
 

Protected Attributes

MMObjectPooler _objectPooler
 
float _startTime
 

Member Function Documentation

◆ 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

Member Data Documentation

◆ _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: