Hello, i’m having a bit of trouble figuring out how i should make my weapon manager for my multiplayer game. This manager will handle all generating and spawning of the weapons.
For my game i’m going to have many different kinds of weapons each of which can generate different stats and modifiers on them. These base weapons and all the modifiers are coming from different DataTables that the manager class has as a reference too. The manager can both generate a weapon (Does not spawn it, just makes a struct with all the information that is needed to spawn it) and it can spawn the weapons and return a reference to whoever wanted the weapon.
So i made a class that inherits from AActor that has the needed functions and the GameState class spawns and keeps a reference to this manager, which other classes can get when they want something from the manager. This is working just fine, both in multiplayer and without networking.
But i feel like having it be an AActor might not be necessary and GameState might be the wrong place to Spawn/Keep a reference of the manager. (I chose GameState because it always replicates to clients which made them able to use some helper functions to look at the DataTables for the weapon generating/creating)
I would love to hear how other people go about making manager classes, and what they think about how i did it.
Thanks for reading.