| 881 | } |
| 882 | |
| 883 | PhysicsBody* PhysicsWorld::getBody(int tag) const |
| 884 | { |
| 885 | for (auto&& body : _bodies) |
| 886 | { |
| 887 | if (body->getTag() == tag) |
| 888 | { |
| 889 | return body; |
| 890 | } |
| 891 | } |
| 892 | |
| 893 | return nullptr; |
| 894 | } |
| 895 | |
| 896 | void PhysicsWorld::setGravity(const Vec2& gravity) |
| 897 | { |