Sphere collider reflection

This commit is contained in:
WiggleWizard
2024-09-13 23:59:56 +01:00
parent 5d0eb4a597
commit d62f241a16

View File

@@ -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();