| 197 | } |
| 198 | |
| 199 | PhysicsBody* PhysicsBody::createBox(const Vec2& size, const PhysicsMaterial& material, const Vec2& offset) |
| 200 | { |
| 201 | PhysicsBody* body = new PhysicsBody(); |
| 202 | if (body->init()) |
| 203 | { |
| 204 | body->addShape(PhysicsShapeBox::create(size, material, offset)); |
| 205 | body->autorelease(); |
| 206 | return body; |
| 207 | } |
| 208 | |
| 209 | AX_SAFE_DELETE(body); |
| 210 | return nullptr; |
| 211 | } |
| 212 | |
| 213 | PhysicsBody* PhysicsBody::createPolygon(const Vec2* points, |
| 214 | int count, |
nothing calls this directly
no test coverage detected