Particle class
Represents a particle in the particle system.
Constructors
- Particle()
Properties
- age ↔ int
-
Time since particle instantiation.
getter/setter pair
- angle ↔ double
-
Dynamic angle of the particle.
getter/setter pair
- color ↔ ParticleColor
-
Color of the particle.
getter/setter pair
- emitterType ↔ EmitterType
-
Type of emitter (linear or radial).
getter/setter pair
- emitterX ↔ double
-
Dynamic X position of the emitter.
getter/setter pair
- emitterY ↔ double
-
Dynamic Y position of the emitter.
getter/setter pair
- finishColor ↔ Color
-
Final color of the particle.
getter/setter pair
- finishRotation ↔ double
-
End rotation of the particle.
getter/setter pair
- finishSize ↔ double
-
Final size of the particle.
getter/setter pair
- gravityX ↔ double
-
Dynamic X gravity of the particle.
getter/setter pair
- gravityY ↔ double
-
Dynamic Y gravity of the particle.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- lifespan ↔ int
-
Lifespan of the particle.
getter/setter pair
- maxRadius ↔ double
-
Maximum radius of the particle.
getter/setter pair
- minRadius ↔ double
-
Minimum radius of the particle.
getter/setter pair
- radialAcceleration ↔ double
-
Radial acceleration of the particle.
getter/setter pair
- radius ↔ double
-
Dynamic radius of the particle.
getter/setter pair
- radiusDelta ↔ double
-
Dynamic change in radius of the particle.
getter/setter pair
- rotatePerSecond ↔ double
-
Rotation per second of the particle.
getter/setter pair
- rotation ↔ double
-
Dynamic rotation of the particle.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size ↔ double
-
Size of the particle.
getter/setter pair
- speed ↔ double
-
Initial speed of the particle.
getter/setter pair
- startColor ↔ Color
-
Initial color of the particle.
getter/setter pair
- startRotation ↔ double
-
Start rotation of the particle.
getter/setter pair
- startSize ↔ double
-
Initial size of the particle.
getter/setter pair
- tangentialAcceleration ↔ double
-
Tangential acceleration of the particle.
getter/setter pair
- transform ↔ ParticleTransform
-
Transform of the particle.
getter/setter pair
- velocityX ↔ double
-
Dynamic X velocity of the particle.
getter/setter pair
- velocityY ↔ double
-
Dynamic Y velocity of the particle.
getter/setter pair
- x ↔ double
-
Dynamic X position of the particle.
getter/setter pair
- y ↔ double
-
Dynamic Y position of the particle.
getter/setter pair
Methods
-
initialize(
{EmitterType emitterType = EmitterType.gravity, required int age, required int lifespan, required double speed, required double emitterX, required double emitterY, required double startSize, required double finishSize, required Color startColor, required Color finishColor, required double angle, required double rotatePerSecond, required double startRotation, required double finishRotation, required double radialAcceleration, required double tangentialAcceleration, required double minRadius, required double maxRadius, required double gravityX, required double gravityY}) → void - Initializes particle properties.
-
isDead(
) → bool - Return true if finished its life and reserved in pooling system
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
int deltaTime) → void -
Updates the particle's state based on the given
deltaTime
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited