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);
67 static void destroy();
77 void removeTextures ();
82 float radius, PowerupManager::PowerupType type,
83 bool exclude_owned=
false);
90 std::shared_ptr<Rewinder>
91 addRewinderFromNetworkState(
const std::string& uid);
94 PowerupManager::PowerupType type);
96 std::vector<Vec3> getBasketballPositions();
98 void addByUID(
const std::string& uid, std::shared_ptr<Flyable> f)
101 void removeByUID(
const std::string& uid)
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Definition: flyable.hpp:50
A small interface for effects to be used when a kart is hit.
Definition: hit_effect.hpp:33
Utility class, you can inherit from this class to disallow the assignment operator and copy construct...
Definition: no_copy.hpp:26
Definition: projectile_manager.hpp:46
std::shared_ptr< Flyable > newProjectile(AbstractKart *kart, PowerupManager::PowerupType type)
Creates a new projectile of the given type.
Definition: projectile_manager.cpp:173
int getNearbyProjectileCount(const AbstractKart *const kart, float radius, PowerupManager::PowerupType type, bool exclude_owned=false)
Returns an int containing the numbers of a given flyable in a given radius around the kart.
Definition: projectile_manager.cpp:240
void update(int ticks)
General projectile update call.
Definition: projectile_manager.cpp:109
void updateGraphics(float dt)
Called once per rendered frame.
Definition: projectile_manager.cpp:101
std::map< std::string, std::shared_ptr< Flyable > > m_active_projectiles
The list of all active projectiles, i.e.
Definition: projectile_manager.hpp:52
bool projectileIsClose(const AbstractKart *const kart, float radius)
Returns true if a projectile is within the given distance of the specified kart.
Definition: projectile_manager.cpp:218
void addHitEffect(HitEffect *hit_effect)
Adds a special hit effect to be shown.
Definition: projectile_manager.hpp:87
HitEffects m_active_hit_effects
All active hit effects, i.e.
Definition: projectile_manager.hpp:56
void updateServer(int ticks)
Updates all rockets on the server (or no networking).
Definition: projectile_manager.cpp:138
Definition: rewinder.hpp:44
Definition: track.hpp:114
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35