GSimpleParticle class

A particle used in a GSimpleParticleSystem. This class is used internally by the GSimpleParticleSystem class and is not intended for direct usage.

The rendering uses LinkedLists, so the particle is a node in a list.

Constructors

GSimpleParticle()
Creates a new GSimpleParticle instance.

Properties

$next GSimpleParticle?
A reference to the next particle in the particle list.
getter/setter pair
$nextInstance GSimpleParticle?
A reference to the next available particle instance in the object pool.
getter/setter pair
$prev GSimpleParticle?
A reference to the previous particle in the particle list.
getter/setter pair
accelerationX double
The x acceleration of the particle.
getter/setter pair
accelerationY double
The y acceleration of the particle.
getter/setter pair
accumulatedEnergy double
The accumulated energy (lifetime) of the particle.
getter/setter pair
alpha double
The alpha (transparency) of the particle.
getter/setter pair
blue double
The blue color component of the particle.
getter/setter pair
color Color
The color of the particle, calculated from its alpha, red, green, and blue properties.
no setter
endAlpha double
The final alpha (transparency) of the particle.
getter/setter pair
endBlue double
The final green color component of the particle.
getter/setter pair
endGreen double
The final green color component of the particle.
getter/setter pair
endRed double
The final red color component of the particle.
getter/setter pair
endScale double
The end scale of the particle.
getter/setter pair
energy double
The amount of energy (lifetime) of the particle.
getter/setter pair
green double
The green color component of the particle.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int
The unique ID of the particle.
getter/setter pair
initialAccelerationX double
The initial x acceleration of the particle.
getter/setter pair
initialAccelerationY double
The initial y acceleration of the particle.
getter/setter pair
initialAlpha double
The initial alpha (transparency) of the particle.
getter/setter pair
initialBlue double
The initial blue color component of the particle.
getter/setter pair
initialGreen double
The initial green color component of the particle.
getter/setter pair
initialRed double
The initial red color component of the particle.
getter/setter pair
initialScale double
The initial scale of the particle.
getter/setter pair
initialVelocityAngular double
The initial angular velocity of the particle.
getter/setter pair
initialVelocityX double
The initial x velocity of the particle.
getter/setter pair
initialVelocityY double
The initial y velocity of the particle.
getter/setter pair
red double
The red color component of the particle.
getter/setter pair
rotation double
The rotation of the particle, in radians.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scaleX double
The x scale of the particle.
getter/setter pair
scaleY double
The y scale of the particle.
getter/setter pair
texture GTexture?
The texture of the particle (is required to render something).
getter/setter pair
velocityX double
The x velocity of the particle.
getter/setter pair
velocityY double
The y velocity of the particle.
getter/setter pair
x double
The x position of the particle.
getter/setter pair
y double
The y position of the particle.
getter/setter pair

Methods

$init(GSimpleParticleSystem emitter, [bool invalidate = true]) → void
(Internal usage)
$update(GSimpleParticleSystem emitter, double delta) → void
(Internal usage) Updates the particle's properties based on the elapsed time since creation.
dispose() → void
Disposes the particle and returns it to the object pool.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

$availableInstance GSimpleParticle?
A reference to the first available particle instance in the object pool.
getter/setter pair
$instanceCount int
The total number of particle instances created.
getter/setter pair

Static Methods

get() GSimpleParticle
Returns an available GSimpleParticle instance.
precache(int count) → void
Caches count instances of GSimpleParticle.