Creating the Explosion class


show more Creating the Explosion class provides you with in-depth training on Developer. Taught by Lee Brimelow as part of the Building Flash Games with Starling show less
please wait ...

Creating the Explosion class

So in the last movie we created our smoke particle effect, which is attached to our hero ship. Now we are going to create the explosion effect which happens when a bullet hits an alien. Now this one is going to be little different because we are going to need to create a lot of these potentially. So we are going to need to make sure that we manage them. So we are first going to create an Explosion class which is going to subclass the PDParticleSystem, and then we are going to create an ExplosionManager which is going to help us track these in our game.

So I'm going to go to our objects class and create a new ActionScript Class, and I'm going to call it Explosion and this is going to have a Superclass of PDParticleSystem and click Finish. So now in the constructor here it's expecting us to send in the config and the texture, so now we need to embed that into our assets class. So I'm going to copy the one that we have for our smoke particle effect and paste it, and this one ...

Creating the Explosion class
Video duration: 2m 6s 2h 57m Intermediate

Viewers:

Creating the Explosion class provides you with in-depth training on Developer. Taught by Lee Brimelow as part of the Building Flash Games with Starling

please wait ...