cBundleManager class
Base classes
- class cStrategy
Public static functions
- static auto Get() -> cBundleManager*
Public functions
- auto CreateBundles(float amount, cGameBundleContainer* container, int bundleType) -> cGameBundle*
- Creates one or more bundles of the given type and adds them to the container.
- auto CreateGroundBundles(float amount, int bundleType, const Vector3& position, const Quaternion& orientation = Quaternion()) -> cGameBundle*
- Creates one or more bundles of the given type and adds them to mpGroundContainer.
- auto RemoveBundles(float amount, cGameBundleContainer* container, cGameBundle* bundle = nullptr) -> float
- Removes a certain quantity from a bundle container.
- auto RemoveGroundBundles(float amount, cGameBundle* bundle = nullptr) -> float
- Removes a certain quantity from mpGroundContainer.
Public variables
Function documentation
cGameBundle* Simulator:: cBundleManager:: CreateBundles(float amount,
cGameBundleContainer* container,
int bundleType)
Creates one or more bundles of the given type and adds them to the container.
| Parameters | |
|---|---|
| amount | |
| container | |
| bundleType | |
| Returns | The last bundle created |
The number of bundles created depends on the 'amount' and how much value each bundle can contain, which depends on the container.
cGameBundle* Simulator:: cBundleManager:: CreateGroundBundles(float amount,
int bundleType,
const Vector3& position,
const Quaternion& orientation = Quaternion())
Creates one or more bundles of the given type and adds them to mpGroundContainer.
| Parameters | |
|---|---|
| amount | |
| bundleType | |
| position | |
| orientation | |
| Returns | The last bundle created |
The number of bundles created depends on the 'amount' and how much value each bundle can contain, which depends on the container.
float Simulator:: cBundleManager:: RemoveBundles(float amount,
cGameBundleContainer* container,
cGameBundle* bundle = nullptr)
Removes a certain quantity from a bundle container.
| Parameters | |
|---|---|
| amount | |
| container | |
| bundle | If not null, removes only that specific bundle |
| Returns | The actual amount that has been removed. |
This will remove as many bundles as necessary, and change the value of the last remaining bundle. If the amount is small enough, no bundle may be deleted.
float Simulator:: cBundleManager:: RemoveGroundBundles(float amount,
cGameBundle* bundle = nullptr)
Removes a certain quantity from mpGroundContainer.
| Parameters | |
|---|---|
| amount | |
| bundle | If not null, removes only that specific bundle |
| Returns | The actual amount that has been removed. |
This will remove as many bundles as necessary, and change the value of the last remaining bundle. If the amount is small enough, no bundle may be deleted.