22#ifndef HEADER_CAKE_HPP
23#define HEADER_CAKE_HPP
27 namespace scene {
class IMesh; }
31#include "items/flyable.hpp"
43 static float m_gravity;
45 btVector3 m_initial_velocity;
52 static void init (
const XMLNode &node, scene::IMesh *cake_model);
57 if (!m_has_server_state)
66 {
return m_initial_velocity; }
74 { m_initial_velocity = v; }
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
virtual bool hit(AbstractKart *kart, PhysicalObject *obj=NULL) OVERRIDE
Callback from the physics in case that a kart or physical object is hit.
Definition: cake.cpp:62
static void init(const XMLNode &node, scene::IMesh *cake_model)
Initialises the object from an entry in the powerup.xml file.
Definition: cake.cpp:44
virtual void setVelocity(const btVector3 &v) OVERRIDE
Kinematic objects are not allowed to have a velocity (assertion in bullet), so we have to do our own ...
Definition: cake.hpp:73
Moveable * m_target
Which kart is targeted by this projectile (NULL if none).
Definition: cake.hpp:48
static float m_st_max_distance_squared
Maximum distance for a missile to be attracted.
Definition: cake.hpp:42
virtual void onFireFlyable() OVERRIDE
Call when the item is (re-)fired (during rewind if needed) by projectile_manager.
Definition: cake.cpp:79
virtual void hitTrack() OVERRIDE
Called when this flyable hits the track.
Definition: cake.hpp:55
virtual const btVector3 & getVelocity() const OVERRIDE
Kinematic objects are not allowed to have a velocity (assertion in bullet), so we have to do our own ...
Definition: cake.hpp:65
Definition: flyable.hpp:50
Definition: moveable.hpp:46
Definition: physical_object.hpp:40
utility class used to parse XML files
Definition: xml_node.hpp:48