All 3 are in the WeaponFramework namespace. Any unique UI parts of a weapon type are added to the UI directly at runtime by the weapon's instantiation method. The WeaponManager is used at runtime by the UI, to do things like aim, ready, fire, and disable the weapon. It's passed the reference of the weapon at runtime, and calls the Weapon class's inherited methods. This isn't attached to or part of the weapon at all. There is also a singleton, called WeaponManager. They have a relationship and Weapon always knows it's config data. ![]() It has two classes Weapon(containing an inherited firing state machine from abstract class WeaponFramework), and WeaponConfig(containing weapon data and bullet types ect, from abstract WeaponConfigFramework). ![]() ![]() I want to throw you guys some thoughts on how I am setting it up so far and hopefully get some feedback/help.Īt the beginning of the main game scene, a weapon is created. However I'm struggling with dependencies, and trying to make objects not aware of each other too much. I want to keep a decent level of abstraction so my classes don't become rigid and brittle, and I can extend on this project. I'm trying to create some systems and have them relating, using the composite design pattern.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |