Aerodynamic Objects Core 2.0.0
Loading...
Searching...
No Matches
AerodynamicObjects.Utility.ObjectSpawner Class Referenceabstract

A base class used to spawn objects at a given rate over time. More...

Inheritance diagram for AerodynamicObjects.Utility.ObjectSpawner:
AerodynamicObjects.Demos.ContiguousLineVortexSpawner AerodynamicObjects.Demos.ExampleSpawner AerodynamicObjects.Demos.FrisbeeLauncher AerodynamicObjects.Demos.PaperPlaneSpawner AerodynamicObjects.Demos.RingVortexSpawner AerodynamicObjects.Demos.SourceSpawner

Public Member Functions

virtual void FixedUpdate ()
 When overriding this fixed update make sure to call base.FixedUpdate() so that the spawn timer still works. More...
 
abstract void Spawn ()
 Define the logic for creating/spawning the object. More...
 

Public Attributes

float spawnRate
 The frequency at which objects are spawned (number of objects per second). More...
 

Detailed Description

A base class used to spawn objects at a given rate over time.

To create an object spawner, inherit this class and override the Spawn function with your desired spawn logic, e.g. Instantiate(prefab) The spawner will call the spawn function at the given spawn rate automatically.

Member Function Documentation

◆ FixedUpdate()

virtual void AerodynamicObjects.Utility.ObjectSpawner.FixedUpdate ( )
virtual

When overriding this fixed update make sure to call base.FixedUpdate() so that the spawn timer still works.

◆ Spawn()

Member Data Documentation

◆ spawnRate

float AerodynamicObjects.Utility.ObjectSpawner.spawnRate

The frequency at which objects are spawned (number of objects per second).


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