Adding the smoke texture


show more Adding the smoke texture 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 ...

Adding the smoke texture

So now that I've showed you how you can go ahead and create particle effects, let's incorporate the first particle effect into our actual game. So I've included two particle effects in the assets; the first is this smoke particle effect and this is going to be the exhaust for our hero ship. So I'm in our assets class. Now remember that our particle PNG file is actually in our texture atlas, so we don't need to actually go ahead, and embed that here. All we need to embed is the PEX file.

So I'm going to say Embed(source=" assets/smoke.pex" which again is that XML file, and I'm just going to copy this, because again, since it's an XML file, we need to set its MIME type. And now I'm going to create this as a public static variable because we are going to reference this directly from our Hero class. Public static var and I'm just going to call it smokeXML, it's going to be of Type class.

Okay, so now let's go to our Hero class, and wha...

Adding the smoke texture
Video duration: 5m 3s 2h 57m Intermediate

Viewers:

Adding the smoke texture provides you with in-depth training on Developer. Taught by Lee Brimelow as part of the Building Flash Games with Starling

please wait ...