![]() |
VR-Forces 5.0.1 Developer's Guide
|
The DtAmmunitionManager is a clas that will maintain ammunition (that which is not published, such as bullets in a gun), their munition type, and the targets they can currently target.
Public Member Functions | |
| DtAmmunitionManager () | |
| virtual | ~DtAmmunitionManager () |
| virtual bool | init () |
| virtual bool | reinitialize () |
| virtual bool | loadParametersFromFile (const DtFilename &filename) |
| virtual void | resetParameters () |
| virtual DtAmmunitionParams * | setParameters (DtAmmunitionParams *) |
| virtual bool | parametersLoaded () const |
| virtual const DtFilename & | parametersFile () const |
| virtual DtAmmunitionParams * | parameters () |
| virtual const DtAmmunitionParams * | parameters () const |
Static Public Member Functions | |
| static void | setAmmunitionManager (DtAmmunitionManager *) |
| static DtAmmunitionManager * | ammunitionManager () |
Protected Member Functions | |
| virtual DtAmmunitionParams * | createParameters () |
Protected Attributes | |
| DtFilename | myParametersFile |
| DtAmmunitionParams * | myParameters |
Static Protected Attributes | |
| static DtAmmunitionManager * | theAmmunitionManager |
Private Member Functions | |
| DtAmmunitionManager (const DtAmmunitionManager &orig) | |
| DtAmmunitionManager & | operator= (const DtAmmunitionManager &other) |
| DtAmmunitionManager::DtAmmunitionManager | ( | ) |
Constructs the ammunition manager.
|
virtual |
The destructor.
|
private |
Not defined! copy constructor.
|
virtual |
Initializes the ammunition manager.
|
virtual |
Resets the ammunition manager to initial state.
|
virtual |
Calls createParameters() to get a new instance of the parameter object, and calls getSelf() on the parameters to load them from the file. Assigns the newly loaded parameters to myParameters and processes parameters specified. If there are parameters already in this class it will merge the parameters in. Make sure to call reinitialize before load if you want to load parameters into a clean list.
|
virtual |
|
virtual |
|
virtual |
Resets the parameters.
|
virtual |
Sets parameters and returns the existing parameters. Once set this class will take ownership of the memory. If you do not need the old parameters that are returned, delete them.
|
virtual |
|
virtual |
|
static |
Set this in order to be able to map between the ammunition name in the priorities list and the ammunition type. If this manager is not present then there can be no mapping.
|
static |
|
protectedvirtual |
|
private |
assignment operator
|
protected |
|
protected |
Parameters for this ammunition manager.
|
staticprotected |
The global instance that can be referened by other classes. This must be set in order to be used. The creation of an ammunition manager will not, by default, set this value.