Used to recycle projectiles.
More...
#include <ProjectilePool.h>
Used to recycle projectiles.
◆ ProjectilePool()
| ShooterLibrary::ProjectilePool::ProjectilePool |
( |
Level * |
pLevel, |
|
|
bool |
expands = true |
|
) |
| |
|
inline |
Instantiate a projectile pool object.
- Parameters
-
| pLevel | A pointer to the current level. |
| expands | Allows the pool to dynamically create projectiles when it's empty. |
◆ Add()
| void ShooterLibrary::ProjectilePool::Add |
( |
Projectile * |
pProjectile | ) |
|
Add a projectile to the pool.
- Parameters
-
| pProjectile | The projectile to add. |
◆ Draw()
| void ShooterLibrary::ProjectilePool::Draw |
( |
SpriteBatch * |
pSpriteBatch | ) |
|
|
virtual |
◆ GetInactiveProjectile()
template<typename T >
| Projectile* ShooterLibrary::ProjectilePool::GetInactiveProjectile |
( |
| ) |
|
|
inline |
Get the next available projectile.
- Returns
- Returns a pointer to the projectile.
The documentation for this class was generated from the following files: