|
void | loadData () |
|
void | cleanup () |
|
void | update (int ticks) |
| General projectile update call.
|
|
void | updateGraphics (float dt) |
| Called once per rendered frame.
|
|
void | removeTextures () |
|
bool | projectileIsClose (const AbstractKart *const kart, float radius) |
| Returns true if a projectile is within the given distance of the specified kart.
|
|
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.
|
|
void | addHitEffect (HitEffect *hit_effect) |
| Adds a special hit effect to be shown.
|
|
std::shared_ptr< Rewinder > | addRewinderFromNetworkState (const std::string &uid) |
|
std::shared_ptr< Flyable > | newProjectile (AbstractKart *kart, PowerupManager::PowerupType type) |
| Creates a new projectile of the given type.
|
|
std::vector< Vec3 > | getBasketballPositions () |
|
void | addByUID (const std::string &uid, std::shared_ptr< Flyable > f) |
|
void | removeByUID (const std::string &uid) |
|
|
static ProjectileManager * | get () |
|
static void | create () |
|
static void | destroy () |
|
static void | clear () |
|
|
typedef std::vector< HitEffect * > | HitEffects |
|
|
std::string | getUniqueIdentity (AbstractKart *kart, PowerupManager::PowerupType type) |
|
void | updateServer (int ticks) |
| Updates all rockets on the server (or no networking).
|
|
◆ addHitEffect()
void ProjectileManager::addHitEffect |
( |
HitEffect * |
hit_effect | ) |
|
|
inline |
Adds a special hit effect to be shown.
- Parameters
-
hit_effect | The hit effect to be added. |
◆ getNearbyProjectileCount()
int ProjectileManager::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.
- Parameters
-
kart | The kart for which the test is done. |
radius | Distance within which the projectile must be. |
type | The type of projectile checked |
◆ newProjectile()
std::shared_ptr< Flyable > ProjectileManager::newProjectile |
( |
AbstractKart * |
kart, |
|
|
PowerupManager::PowerupType |
type |
|
) |
| |
Creates a new projectile of the given type.
- Parameters
-
kart | The kart which shoots the projectile. |
type | Type of projectile. |
◆ projectileIsClose()
bool ProjectileManager::projectileIsClose |
( |
const AbstractKart *const |
kart, |
|
|
float |
radius |
|
) |
| |
Returns true if a projectile is within the given distance of the specified kart.
- Parameters
-
kart | The kart for which the test is done. |
radius | Distance within which the projectile must be. |
◆ updateGraphics()
void ProjectileManager::updateGraphics |
( |
float |
dt | ) |
|
Called once per rendered frame.
It is used to only update any graphical effects, and calls updateGraphics in any flyable objects.
- Parameters
-
dt | Time step size (since last call). |
◆ m_active_hit_effects
HitEffects ProjectileManager::m_active_hit_effects |
|
private |
All active hit effects, i.e.
hit effects which are currently being shown or have a sfx playing.
◆ m_active_projectiles
std::map<std::string, std::shared_ptr<Flyable> > ProjectileManager::m_active_projectiles |
|
private |
The list of all active projectiles, i.e.
projectiles which are currently moving on the track.
The documentation for this class was generated from the following files: