hgeParticleManager::SpawnPS

Creates a particle system instance.

hgeParticleSystem *SpawnPS(
  hgeParticleSystemInfo *psi,
  float x,
  float y
);

Parameters

psi
Pointer to a valid hgeParticleSystemInfo structure, describing the particle system.
x
Screen x-coordinate.
y
Screen y-coordinate.

Return value

If succeeded returns pointer to the created particle system, otherwise returns 0.

Remarks

The maximum number of simultaneously allowed particle systems within one manager is 100. If you try to create more particle systems, SpawnPS will return 0.

The manager monitors a particle system created by SpawnPS method and removes it from memory as soon as it is stopped (either manually or because of it's life time have passed) and all it's particles are dead.

If you want to access the particle system via the pointer returned by SpawnPS, you should first ensure that the pointer is valid with IsPSAlive method. Also, don't delete the returned pointer manually, this may cause system crash.

Requirements

Header: hgeparticle.h
Import library: hgehelp.lib

See also

IsPSAlive, KillPS