Creating the BulletManager class


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

So we now have a bullet game object. But there's going to be a lot of bullets that are going to be flying around, so in order to keep track of them and to handle the updating and destroying we're going to create a BulletManager class, and this is the first of a series of manager classes that we're going to be creating to manage different objects. So I'm going to right-click on my main source folder and create a new ActionScript Class, and I'm going to create a package for these manager classes and I'm going to call it managers, and then I'm going to create a new BulletManager class, and this doesn't have any Superclass or interfaces involved.

So I'll click Finish, and now I'm going to stub out this manager class. So the first thing I'm going to do when I create a BulletManager is to send in a reference to our main play state, so I need an argument here to catch it. I'm going to call it play, and this is going to be of type Play. So let'...

Creating the BulletManager class
Video duration: 4m 23s 2h 57m Intermediate

Viewers:

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

please wait ...