new ParticleGameObject(texture, atX, atY, cyclesToLive) → {ParticleGameObject}
Default Contsructor
support particle object particulars: color change and expiration
Parameters:
Name | Type | Description |
---|---|---|
texture |
String | Texture filename |
atX |
Number | X Position of particle |
atY |
Number | Y Position of particle |
cyclesToLive |
Number | Number of gameupdates to live |
- Source:
Returns:
New instance of ParticleGameObject
- Type
- ParticleGameObject
Methods
hasExpired() → {Boolean}
Return if the particle has expired
- Source:
Returns:
True if the particle is out of cycles
- Type
- Boolean
setFinalColor(f) → {void}
Set final color for the particle to change to during its life
Parameters:
Name | Type | Description |
---|---|---|
f |
Array.<Float> | final color of particle [R, G, B, A] |
- Source:
Returns:
- Type
- void
setSizeDelta(d) → {void}
Set the size delta of the particle
Parameters:
Name | Type | Description |
---|---|---|
d |
Number | Sife of particle |
- Source:
Returns:
- Type
- void
update() → {void}
Update Function called by GameLoop
- Source:
Returns:
- Type
- void