| 284 | } |
| 285 | |
| 286 | PhysicsBody* PhysicsBody::createEdgeChain(const Vec2* points, |
| 287 | int count, |
| 288 | const PhysicsMaterial& material, |
| 289 | float border /* = 1*/) |
| 290 | { |
| 291 | PhysicsBody* body = new PhysicsBody(); |
| 292 | if (body->init()) |
| 293 | { |
| 294 | body->addShape(PhysicsShapeEdgeChain::create(points, count, material, border)); |
| 295 | body->setDynamic(false); |
| 296 | body->autorelease(); |
| 297 | return body; |
| 298 | } |
| 299 | |
| 300 | AX_SAFE_DELETE(body); |
| 301 | |
| 302 | return nullptr; |
| 303 | } |
| 304 | |
| 305 | bool PhysicsBody::init() |
| 306 | { |
nothing calls this directly
no test coverage detected