Users browsing this thread: 4 Guest(s)
What's the Most Efficient Way to Program This?
#4
They wouldn't have to inherent from Object, would they? In AS3 you can just make a class from nothing, not extending anything. All these classes would do are hold weapon stats, and maybe one or two methods for some special calculations.

Plus, you don't even need to instantiate them all at once. You could make subclasses for every separate weapon, and just instantiate them (with their unique traits, like bonus damage) when you pick it up. Then you don't have them all floating around with nothing to do. I do admit that a separate class for every weapon is a bit of a hassle, but it isn't much worse than huge arrays.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Thanked by:


Messages In This Thread
RE: What's the Most Efficient Way to Program This? - by puggsoy - 08-08-2013, 09:44 PM

Forum Jump: