Creating the AlienManager class


show more Creating the AlienManager 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 AlienManager class

So now that we've created our Alien class we're going to create our AlienManager class. So I'm going to go to my manager's package, right-click, create a new ActionScript class and call it AlienManager and I'm going to start with the code from the BulletManager class, because there's going to be a lot of similarities. So I'm just going to copy all of that class to the clipboard and just overwrite the AlienManager class here. Now obviously I need to go through and change the class name to AlienManager.

We're going to change our Array here from bullets to aliens. So I'm just going to refactor and rename that. And we're going to change our pool, because obviously we don't want to create bullets for our pool, we want to create alien objects. So we're going to make sure we import that Alien class and we're not going to need a hundred of them. At most we're going to need 20 aliens in any one time, and again, that's a number you can arr...

Creating the AlienManager class
Video duration: 8m 12s 2h 57m Intermediate

Viewers:

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

please wait ...