Tinman  1.0
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
PowerUp Class Reference

#include <powerup.h>

Public Types

enum  Type { Type::Nitro, Type::MoneyBag }
 
typedef float seconds
 
typedef btVector3 Position
 
typedef std::pair< Position, secondsLocation
 
typedef std::shared_ptr< PowerUpshared
 

Public Member Functions

 PowerUp (Scene::shared scene, Physics::shared physics, Animation::shared animation)
 
virtual ~PowerUp ()
 
void realize (Type object)
 
void update (float delta)
 
void pick_up ()
 
void reset ()
 
void active_animation (std::string animation_name)
 

Public Attributes

btRigidBody * body_
 

Private Member Functions

void read_locations (std::string file)
 
void replace (btVector3 new_position)
 
void add_to_scene ()
 
void remove_from_scene ()
 

Private Attributes

std::string file_
 
Animation::shared animation_
 
Scene::shared scene_
 
Physics::shared physics_
 
Ogre::SceneNode * node_
 
Ogre::Entity * entity_
 
btCollisionShape * shape_
 
std::vector< Locationlocations_
 
Location last_location_
 
float start_
 
bool removed_
 

Member Typedef Documentation

typedef std::pair<Position, seconds> PowerUp::Location
typedef btVector3 PowerUp::Position
typedef float PowerUp::seconds
typedef std::shared_ptr<PowerUp> PowerUp::shared

Member Enumeration Documentation

enum PowerUp::Type
strong
Enumerator
Nitro 
MoneyBag 

Constructor & Destructor Documentation

PowerUp::PowerUp ( Scene::shared  scene,
Physics::shared  physics,
Animation::shared  animation 
)
PowerUp::~PowerUp ( )
virtual

Member Function Documentation

void PowerUp::active_animation ( std::string  animation_name)
void PowerUp::add_to_scene ( )
private
void PowerUp::pick_up ( )
void PowerUp::read_locations ( std::string  file)
private
void PowerUp::realize ( PowerUp::Type  object)
void PowerUp::remove_from_scene ( )
private
void PowerUp::replace ( btVector3  new_position)
private
void PowerUp::reset ( )
void PowerUp::update ( float  delta)

Member Data Documentation

Animation::shared PowerUp::animation_
private
btRigidBody* PowerUp::body_
Ogre::Entity* PowerUp::entity_
private
std::string PowerUp::file_
private
Location PowerUp::last_location_
private
std::vector<Location> PowerUp::locations_
private
Ogre::SceneNode* PowerUp::node_
private
Physics::shared PowerUp::physics_
private
bool PowerUp::removed_
private
Scene::shared PowerUp::scene_
private
btCollisionShape* PowerUp::shape_
private
float PowerUp::start_
private

The documentation for this class was generated from the following files: