ParticleBase : Sprite

Class

The ParticleBase class shows how to make a basic and simple particle. Its draw method has no body - because you must provide a way to draw them. This is just a very basic physic simulation for a not very impressive particle. Still, useful to build on top.

Members


wander

wander : Number

Don't ask me, I'm just passing by here to say hi.


theta

theta : Number

Angle.


drag

drag : Number

Decceleration of sorts.


vx

vx : Number

Speed factor for each axis.


vy

vy : Number

r

r : Number

g

g : Number

b

b : Number

Methods


constructor

constructor (path, x, y, radius)

Path to the image, just in case you want to get fancy.


update

update (delta)

draw

draw ()

spawn

spawn ()

clone

clone ()