X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2FentityManager.cpp;h=0707dfe03eb8e1015882a5502ad03855c69c39c9;hb=9ae1c0798cff2d1ed816bccb0723bd5a4ca97194;hp=82dc6d824f43b5dbe63047910f8e8893d337ff00;hpb=e68f847b245153427266841ae724d602ca434c29;p=physics.git diff --git a/src/entityManager.cpp b/src/entityManager.cpp index 82dc6d8..0707dfe 100644 --- a/src/entityManager.cpp +++ b/src/entityManager.cpp @@ -19,12 +19,14 @@ #include "debug.h" #include -#include #include "Entities/Entity.h" #include "Entities/Particle.h" #include "Entities/PhysicsEntity.h" +#include "collisionManager.h" +#include "effectManager.h" + /// ***** Private Method Headers ***** void updateParticles(float); @@ -46,11 +48,11 @@ setPhys physics_To_Remove; void manager::init() { - + collision::init(); } void manager::clean() { - + collision::clean(); } /// ***** Public Methods ***** @@ -75,8 +77,9 @@ void manager::add(Entity* e) } } - std::cerr << "ENTITY TYPE NOT SUPPORTED BY addEntity()!!"; - std::cerr << std::endl; +#ifdef WARNINGS + cerr << "ENTITY TYPE NOT SUPPORTED BY addEntity()!!" << endl; +#endif } void manager::remove(Entity* e) { @@ -98,16 +101,19 @@ void manager::remove(Entity* e) } } - std::cerr << "ENTITY TYPE NOT SUPPORTED BY deleteEntity()!!"; - std::cerr << std::endl; +#ifdef WARNINGS + cerr << "ENTITY TYPE NOT SUPPORTED BY deleteEntity()!!" << endl; +#endif } void manager::handleInput() { - // TODO + effect::handleInput(); } void manager::update(float time_step) { + effect::update(time_step); + updateParticles(time_step); updatePhysics(time_step); } @@ -180,6 +186,9 @@ void updatePhysics(float time_step) } physics_To_Remove.clear(); + // apply collision math + collision::update(active_Physics); + // update active PhysicsEntity*s for( setPhys::iterator it = active_Physics.begin(); it != active_Physics.end();