home *** CD-ROM | disk | FTP | other *** search
-
- #import <gamekit/gamekit.h>
-
- // An actor is dumped here when it "dies", rather than being freed.
- // Then, when we need a new actor of the same class, we just grab
- // it from here, re-init it, and put it to work. If there aren't
- // any "dead" actors of the class we need, then we create one.
-
- // Note that this object can take any Class and cache unused copies,
- // it isn't limited to GameActors. (Should I call it an ObjectManager
- // and put it in the DAYMiscKit? Might be useful...)
-
- @interface GKActorManager:Object
- {
- id actorHash; // Filled with Lists, one List per actor class
- }
-
- - init;
- - listOfActorsOfClass:aClass; // returns List of dead actors of class aClass
- - addDeadActor:anActor; // adds a dead actor to the list
- - getActorOfClass:aClass; // returns a dead actor, removing it from the list
- - getActorOfClassNamed:(char *)className; // same as above
-
- @end
-