19 #ifndef HEADER_PROJECTILEMANAGER_HPP 20 #define HEADER_PROJECTILEMANAGER_HPP 24 #include <unordered_set> 29 namespace scene {
class IMesh; }
32 #include "items/powerup_manager.hpp" 33 #include "utils/no_copy.hpp" 48 typedef std::vector<HitEffect*> HitEffects;
59 PowerupManager::PowerupType type);
60 void updateServer(
int ticks);
67 static void destroy();
75 void update (
int ticks);
76 void updateGraphics (
float dt);
77 void removeTextures ();
81 int getNearbyProjectileCount(
const AbstractKart *
const kart,
82 float radius, PowerupManager::PowerupType type,
83 bool exclude_owned=
false);
88 { m_active_hit_effects.push_back(hit_effect); }
90 std::shared_ptr<Rewinder>
91 addRewinderFromNetworkState(
const std::string& uid);
93 std::shared_ptr<Flyable> newProjectile(
AbstractKart *kart,
94 PowerupManager::PowerupType type);
96 std::vector<Vec3> getBasketballPositions();
98 void addByUID(
const std::string& uid, std::shared_ptr<Flyable> f)
99 { m_active_projectiles[uid] = f; }
101 void removeByUID(
const std::string& uid)
102 { m_active_projectiles.erase(uid); }
void addHitEffect(HitEffect *hit_effect)
Adds a special hit effect to be shown.
Definition: projectile_manager.hpp:87
Definition: projectile_manager.hpp:45
A wrapper around bullets btVector3 to include conventient conversion functions (e.g.
Definition: vec3.hpp:34
Definition: rewinder.hpp:43
A small interface for effects to be used when a kart is hit.
Definition: hit_effect.hpp:32
Definition: three_d_animation.hpp:32
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:25
Definition: script_track.cpp:52
HitEffects m_active_hit_effects
All active hit effects, i.e.
Definition: projectile_manager.hpp:56
Definition: flyable.hpp:48
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:61
std::map< std::string, std::shared_ptr< Flyable > > m_active_projectiles
The list of all active projectiles, i.e.
Definition: projectile_manager.hpp:52