Method DecreaseCapacity
- Namespace
- Gamelogic.Extensions
- Assembly
- Gamelogic.Extensions.dll
DecreaseCapacity(int, bool)
Decreases the capacity of the pool.
public int DecreaseCapacity(int decrement, bool deactivateFirst = false)
Parameters
decrement
intThe number of pool objects to destroy.
deactivateFirst
boolWhether to deactivate objects before destroying them. Since this pool does not keep track of active objects, no active objects will be destroyed, so this parameter is not relevant.
Returns
- int
The number of objects that were destroyed.
Remarks
This method will not decrease the capacity below the number of currently inactive objects, in other words
active objects will not be destroyed. Therefor, deactivateFirst
is not relevant.