So I have developed a very simple weapon class for a first person game. Each weapon has attributes such as ammo, reload time etc…
When I equip a weapon, I spawn it and give the character a reference to his current weapon. When I switch weapons, I delete this weapon
and spawn a different one. When I now switch back to the previous weapon, I have lost information such as current ammo and other such
What would be an effective way of switching weapons without having to delete them and lose instance information?