Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
SpawnedEffect Class Reference

Detailed Description

When a particle spawned, this script will despawn it after its duration is up.

Documentation updated 8/26/2024

Author
Roy Pascual
Note
Formerly marked as deprecated, but in practice it's actually simplier to use this script over DespawnTimer because it already knows how long it should last for without it having to be specified in the Unity Editor.

Private Member Functions

void Awake ()
 Set reference to particles and get effect duration from it.
 
void Update ()
 Simple timer that destroys the effect object when it expires expires.
 

Private Attributes

ParticleSystem spawnedParticles
 Reference to the particles.
 
float effectDuration
 How long the particles will last before they despawn.
 

Member Function Documentation

◆ Awake()

void SpawnedEffect.Awake ( )
private

Set reference to particles and get effect duration from it.

◆ Update()

void SpawnedEffect.Update ( )
private

Simple timer that destroys the effect object when it expires expires.

Member Data Documentation

◆ effectDuration

float SpawnedEffect.effectDuration
private

How long the particles will last before they despawn.

◆ spawnedParticles

ParticleSystem SpawnedEffect.spawnedParticles
private

Reference to the particles.


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