![]() |
SpaceRTS - Starter Pack
1.3
|
Helper class to maintain a constant buffer of GameObjects ready to use, and reuse. More...
Public Member Functions | |
| GameObject | Instantiate () |
| Takes an element from the buffer and returns it. if there is no more elements in the buffer an expansion will be produced. More... | |
| void | Destroy (GameObject itemToDestroy) |
| Returns the GameObject to the buffer. More... | |
| void | Destroy (IEnumerable< GameObject > itemsToDestroy) |
| Returns all the GameObjects to the Buffer More... | |
Public Attributes | |
| GameObject | template |
| GameObject to use as a template for the buffer. More... | |
| Transform | alivesContainer |
| Transform container for the instanced and alive GameObjects More... | |
| Transform | bufferContainer |
| Transform container for the unused GameObjects More... | |
| int | minBuffer = 10 |
| Minimal amount of created GameObjects for the buffer More... | |
| int | expandBuffer = 4 |
| If the quantity of requested game object is reached, the buffer will expand by this quantity. More... | |
| List< GameObject > | buffer = new List<GameObject>() |
Helper class to maintain a constant buffer of GameObjects ready to use, and reuse.
| void NullPointerGame.Extras.ContentPool.Destroy | ( | GameObject | itemToDestroy | ) |
Returns the GameObject to the buffer.
| itemToDestroy | The GameObject to be returned to the buffer. |
| void NullPointerGame.Extras.ContentPool.Destroy | ( | IEnumerable< GameObject > | itemsToDestroy | ) |
Returns all the GameObjects to the Buffer
| itemsToDestroy | The list of GameObjects to return to the Buffer. |
| GameObject NullPointerGame.Extras.ContentPool.Instantiate | ( | ) |
Takes an element from the buffer and returns it. if there is no more elements in the buffer an expansion will be produced.
| Transform NullPointerGame.Extras.ContentPool.alivesContainer |
Transform container for the instanced and alive GameObjects
| List<GameObject> NullPointerGame.Extras.ContentPool.buffer = new List<GameObject>() |
| Transform NullPointerGame.Extras.ContentPool.bufferContainer |
Transform container for the unused GameObjects
| int NullPointerGame.Extras.ContentPool.expandBuffer = 4 |
If the quantity of requested game object is reached, the buffer will expand by this quantity.
| int NullPointerGame.Extras.ContentPool.minBuffer = 10 |
Minimal amount of created GameObjects for the buffer
| GameObject NullPointerGame.Extras.ContentPool.template |
GameObject to use as a template for the buffer.