![]() |
FYP
1.0.0
Final Year Project -- Alexander Meuer
|
Updates a collection of projectiles. Projectiles are stored in unique_ptrs. More...
#include <ProjectileManager.hpp>

Public Member Functions | |
| ProjectileManager (std::shared_ptr< collision::CollisionGroup > projectileCollisionGroup, sf::Texture const &particleTexture) | |
| Constructs an instance of ProjectileManager. More... | |
| void | give (std::shared_ptr< Projectile > const &projectilePtr) |
| Give a projectile to the manager. More... | |
| void | update (sf::Time const &elapsedTime) |
| Calls update on all managed projectiles. | |
| void | draw (sf::RenderTarget &w) |
| Draws all the managed projectiles. | |
| void | setUnfiredProjectileHandler (std::function< void(std::shared_ptr< Projectile > const &)> const &handler) |
Private Attributes | |
| std::list< std::shared_ptr< Projectile > > | mProjectiles |
| The collection of projectiles to be managed. | |
| std::shared_ptr< collision::CollisionGroup > | mCollisionGroup |
| Group that projectiles will be checked against upon impact. | |
| thor::ParticleSystem | mParticleSystem |
| std::function< void(std::shared_ptr< Projectile > const &)> | mUnfiredProjectileHandler |
Updates a collection of projectiles. Projectiles are stored in unique_ptrs.
| ProjectileManager::ProjectileManager | ( | std::shared_ptr< collision::CollisionGroup > | projectileCollisionGroup, |
| sf::Texture const & | particleTexture | ||
| ) |
Constructs an instance of ProjectileManager.
| projectileCollisionGroup | The collision group against which projectiles will be checked upon impact. |
| particleTexture | Texture used by particles emiited from FancyProjectiles. |
| void ProjectileManager::give | ( | std::shared_ptr< Projectile > const & | projectilePtr | ) |
Give a projectile to the manager.
| projectilePtr | Move referenced unique pointer to a projectile. |