08-08-2013, 09:44 PM
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.
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.