| 246 | } |
| 247 | |
| 248 | PhysicsBody* PhysicsBody::createEdgeBox(const Vec2& size, |
| 249 | const PhysicsMaterial& material, |
| 250 | float border /* = 1*/, |
| 251 | const Vec2& offset) |
| 252 | { |
| 253 | PhysicsBody* body = new PhysicsBody(); |
| 254 | if (body->init()) |
| 255 | { |
| 256 | body->addShape(PhysicsShapeEdgeBox::create(size, material, border, offset)); |
| 257 | body->setDynamic(false); |
| 258 | body->autorelease(); |
| 259 | return body; |
| 260 | } |
| 261 | |
| 262 | AX_SAFE_DELETE(body); |
| 263 | |
| 264 | return nullptr; |
| 265 | } |
| 266 | |
| 267 | PhysicsBody* PhysicsBody::createEdgePolygon(const Vec2* points, |
| 268 | int count, |
nothing calls this directly
no test coverage detected