Particles.Particle
Description: Defines a particle that abides by several configured values.
Implements: EndGate.IUpdateable
Constructors
Particle (texture, fromLocation, toLocation, scale, opacity, rotation, rotationSpeed, lifetime, fadeInDuration, fadeOutDuration, movementFunction)
Creates a new instance of the Particle object.
texture: EndGate.Graphics.Graphic2d
The texture for the particle.
fromLocation: EndGate.Vector2d
The from location of the Particle.
toLocation: EndGate.Vector2d
The end location of the Particle.
scale: number
How large the Particles Texture should be. Value will multiply the size of the provided texture.
opacity: number
The particles opacity. Value should be between 0 and 1.
rotation: number
The particles initial rotation. Value should be in radians.
rotationSpeed: number
How fast the particle should rotate. Value should be X radians per second.
lifetime: EndGate.TimeSpan
How long the particle should live before dying.
fadeInDuration: EndGate.TimeSpan
How long the particle should take to fade in.
fadeOutDuration: EndGate.TimeSpan
How long the particle should take to fade out.
movementFunction: EndGate.Tweening.Functions.ITweeningFunction
The function to use to move from the 'fromLocation' to the 'toLocation'.
Fields
Texture: EndGate.Graphics.Graphic2d
Gets the particles texture.
OnDeath: EndGate.EventHandler1 <Particle>
Gets an event that is triggered when the particle dies. Functions can be bound or unbound to this event to be executed when the event triggers.
Methods
IsAlive()
Determines if the particle is alive.
Update()
Makes the particle move, fade, and even die if needed.
Examples
There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.