fix PhysicBody

This commit is contained in:
Nomango 2020-07-25 01:10:39 +08:00
parent a134a2e952
commit 537f38bde1
2 changed files with 12 additions and 1 deletions

View File

@ -31,7 +31,7 @@ namespace physics
PhysicBody::PhysicBody(PhysicWorld* world, Type type)
: body_(nullptr)
, world_(world)
, type_(Type::Static)
, type_(type)
, category_bits_(0x0001)
, mask_bits_(0xFFFF)
, group_index_(0)
@ -44,6 +44,11 @@ PhysicBody::PhysicBody(PhysicWorld* world, Type type)
}
}
PhysicBody::PhysicBody(PhysicWorldPtr world, Type type)
: PhysicBody(world.Get(), type)
{
}
PhysicBody::~PhysicBody() {}
void PhysicBody::InitComponent(Actor* actor)

View File

@ -56,6 +56,12 @@ public:
/// @param type ÎïÌåÀàÐÍ
PhysicBody(PhysicWorld* world, Type type);
/// \~chinese
/// @brief 初始化物体
/// @param world 物理世界
/// @param type 物体类型
PhysicBody(PhysicWorldPtr world, Type type);
virtual ~PhysicBody();
/// \~chinese