// PhysicsShapeEdgeBox PhysicsShapeEdgeBox* PhysicsShapeEdgeBox::create(const Size& size, const PhysicsMaterial& material/* = MaterialDefault*/, float border/* = 1*/, const Vec2& offset/* = Vec2(0, 0)*/) { PhysicsShapeEdgeBox* shape = new (std::nothrow) PhysicsShapeEdgeBox(); if (shape && shape->init(size, material, border, offset)) { shape->autorelease(); return shape; } CC_SAFE_DELETE(shape); return nullptr; }
// PhysicsShapeEdgeBox PhysicsShapeEdgeBox* PhysicsShapeEdgeBox::create(Size size, PhysicsMaterial material/* = MaterialDefault*/, float border/* = 1*/, Point offset/* = Point(0, 0)*/) { PhysicsShapeEdgeBox* shape = new PhysicsShapeEdgeBox(); if (shape && shape->init(size, material, border, offset)) { shape->autorelease(); return shape; } CC_SAFE_DELETE(shape); return nullptr; }