C# Class flxSharp.flxSharp.FlxParticle

This is a simple particle class that extends the default behavior of FlxSprite to have slightly more specialized behavior common to many game scenarios. You can override and extend this class just like you would FlxSprite. While FlxEmitter used to work with just any old sprite, it now requires a FlxParticle based class.
Inheritance: FlxSprite
Mostra file Open project: jlorek/flxSharp

Public Methods

Method Description
FlxParticle ( ) : System

Instantiate a new particle. Like FlxSprite, all meaningful creation happens during loadGraphic() or makeGraphic() or whatever.

onEmit ( ) : void

Triggered whenever this object is launched by a FlxEmitter. You can override this to add custom behavior like a sound or AI or something.

update ( ) : void

The particle's main update logic. Basically it checks to see if it should be dead yet, and then has some special bounce behavior if there is some gravity on it.

Method Details

FlxParticle() public method

Instantiate a new particle. Like FlxSprite, all meaningful creation happens during loadGraphic() or makeGraphic() or whatever.
public FlxParticle ( ) : System
return System

onEmit() public method

Triggered whenever this object is launched by a FlxEmitter. You can override this to add custom behavior like a sound or AI or something.
public onEmit ( ) : void
return void

update() public method

The particle's main update logic. Basically it checks to see if it should be dead yet, and then has some special bounce behavior if there is some gravity on it.
public update ( ) : void
return void