3 #include "../Entities/PhysicsEntity.h"
4 #include "../Entities/Ball.h"
7 /// ***** Constructors/Destructors *****
18 /// ***** Public Class Methods *****
20 Vector2 Screen::velocityDelta(const PhysicsEntity* e, float time_step) const
22 const Vector2& pos = e->positionRaw();
23 const Vector2& velo = e->velocityRaw();
28 const Ball* b = dynamic_cast<const Ball*>(e);
30 radius = b->getRadius();
33 if(pos.y > 600-radius && velo.y > 0)
36 if(pos.y < 0+radius && velo.y < 0)
39 if(pos.x > 800-radius && velo.x > 0)
42 if(pos.x < 0+radius && velo.x < 0)