Constructor
new Particle(emitter, pos, angle, colorStart, colorEnd, lifeTime, sizeStart, sizeEnd, velocityopt, angleVelocityopt)
Create a particle with the passed in settings Typically this is created automatically by a ParticleEmitter
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
emitter | ParticleEmitter | The emitter that created this particle | ||
pos | Vector2 | World or local space position | ||
angle | number | Angle of the particle | ||
colorStart | Color | Color at start of life | ||
colorEnd | Color | Color at end of life | ||
lifeTime | number | How long to live for | ||
sizeStart | number | Size at start of life | ||
sizeEnd | number | Size at end of life | ||
velocity | Vector2 | <optional> | Velocity of the particle | |
angleVelocity | number | <optional> | 0 | Angular speed of the particle |
- Source
Members
angle
Properties| Type | Description |
|---|---|
| number |
- Source
angleVelocity
Properties| Type | Description |
|---|---|
| number |
- Source
color
Properties| Type | Description |
|---|---|
| Color |
- Source
colorEnd
Properties| Type | Description |
|---|---|
| Color |
- Source
colorStart
Properties| Type | Description |
|---|---|
| Color |
- Source
destroyed
Properties| Type | Description |
|---|---|
| boolean |
- Source
emitter
Properties| Type | Description |
|---|---|
| ParticleEmitter |
- Source
groundObject
Properties| Type | Description |
|---|---|
| EngineObject |
- Source
lifeTime
Properties| Type | Description |
|---|---|
| number |
- Source
mirror
Properties| Type | Description |
|---|---|
| boolean |
- Source
pos
Properties| Type | Description |
|---|---|
| Vector2 |
- Source
size
Properties| Type | Description |
|---|---|
| Vector2 |
- Source
sizeEnd
Properties| Type | Description |
|---|---|
| number |
- Source
sizeStart
Properties| Type | Description |
|---|---|
| number |
- Source
spawnTime
Properties| Type | Description |
|---|---|
| number |
- Source
tileInfo
Properties| Type | Description |
|---|---|
| TileInfo |
- Source
velocity
Properties| Type | Description |
|---|---|
| Vector2 |
- Source
Methods
destroy()
Destroy this particle
- Source
render()
Render the particle, automatically called each frame
- Source
update()
Update the particle
- Source