Sphere collider reflection
This commit is contained in:
@@ -11,12 +11,28 @@ namespace Nuake
|
||||
{
|
||||
NUAKECOMPONENT(SphereColliderComponent, "Sphere Component")
|
||||
|
||||
static void InitializeComponentClass()
|
||||
{
|
||||
BindComponentField<&SphereColliderComponent::IsTrigger>("IsTrigger", "Is Trigger");
|
||||
BindComponentProperty<&SphereColliderComponent::SetRadius, &SphereColliderComponent::GetRadius>("Radius", "Radius");
|
||||
}
|
||||
|
||||
public:
|
||||
Ref<Physics::PhysicShape> Sphere;
|
||||
|
||||
float Radius = 0.5f;
|
||||
bool IsTrigger = false;
|
||||
|
||||
void SetRadius(const float newRadius)
|
||||
{
|
||||
Radius = newRadius;
|
||||
}
|
||||
|
||||
float GetRadius()
|
||||
{
|
||||
return Radius;
|
||||
}
|
||||
|
||||
json Serialize()
|
||||
{
|
||||
BEGIN_SERIALIZE();
|
||||
|
||||
Reference in New Issue
Block a user