/// ***** Constructors/Destructors *****
Running::Running()
{
- entityManager::init();
+ manager::init();
}
Running::~Running()
{
- entityManager::clean();
+ manager::clean();
}
/// ***** Public Class Methods *****
{
if( on_top )
{
- entityManager::handleInput();
+ manager::handleInput();
}
}
void Running::update(float time_step, bool on_top) const
{
if( on_top )
{
- entityManager::update(time_step);
+ manager::update(time_step);
}
}
void Running::draw(bool on_top) const
{
- entityManager::draw();
+ manager::draw();
}
/// ***** Public Methods *****
-void entityManager::init()
+void manager::init()
{
}
-void entityManager::clean()
+void manager::clean()
{
}
-void entityManager::add(Entity* e)
+void manager::add(Entity* e)
{
{
- Particle* p = dynamic_cast<Particle*>(e);
- if( p != 0 )
- {
- particles_To_Add.insert(p);
- return;
- }
+ Particle* p = dynamic_cast<Particle*>(e);
+ if( p != 0 )
+ {
+ particles_To_Add.insert(p);
+ return;
+ }
}
{
- PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
- if( p != 0 )
- {
- physics_To_Add.insert(p);
- return;
- }
+ PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
+ if( p != 0 )
+ {
+ physics_To_Add.insert(p);
+ return;
+ }
}
std::cerr << "ENTITY TYPE NOT SUPPORTED BY addEntity()!!";
std::cerr << std::endl;
}
-void entityManager::remove(Entity* e)
+void manager::remove(Entity* e)
{
{
- Particle* p = dynamic_cast<Particle*>(e);
- if( p != 0 )
- {
- particles_To_Remove.insert(p);
- return;
- }
+ Particle* p = dynamic_cast<Particle*>(e);
+ if( p != 0 )
+ {
+ particles_To_Remove.insert(p);
+ return;
+ }
}
{
- PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
- if( p != 0 )
- {
- physics_To_Remove.insert(p);
- return;
- }
+ PhysicsEntity* p = dynamic_cast<PhysicsEntity*>(e);
+ if( p != 0 )
+ {
+ physics_To_Remove.insert(p);
+ return;
+ }
}
std::cerr << "ENTITY TYPE NOT SUPPORTED BY deleteEntity()!!";
std::cerr << std::endl;
}
-void entityManager::clear()
+void manager::clear()
{
clearParticles = true;
clearPhysics = true;
}
-void entityManager::handleInput()
+void manager::handleInput()
{
// TODO
}
-void entityManager::update(float time_step)
+void manager::update(float time_step)
{
updateParticles(time_step);
updatePhysics(time_step);
}
-void entityManager::draw()
+void manager::draw()
{
// update active Particle*s
for( setPart::iterator it = active_Particles.begin();