Posted 05 April 2013 - 02:29 PM
The way I would do it.
To save weapons :
Save a new instance of WeaponsCollection class, based on the player's Weapons instance member, this should keep the state of everything.
Depending on what you want to do, you may want to save that new instance to the hard drive in binary form just to free RAM.
To load weapons :
From the little I read, the best option is really loop through all weapons in WeaponCollection obejct you've just saved. And replacing weapons as they loop.
First remove the slot data them updated it.
I do think it is a better approach than a lot of boolean variables, and using bools you can't save ammo data, right ?
In any case, if you adopt the 'boolean approach' use an array of them.
I haven't tried this, this is just the way I would first start with.