diff --git a/Source/Nakatomi/Pickup.cpp b/Source/Nakatomi/Pickup.cpp index aea5baa..522c309 100644 --- a/Source/Nakatomi/Pickup.cpp +++ b/Source/Nakatomi/Pickup.cpp @@ -19,7 +19,6 @@ APickup::APickup() SphereComponent->SetupAttachment(RootComponent); PointLightComponent = CreateDefaultSubobject(TEXT("PointLightComponent")); - PointLightComponent->SetLightColor(FLinearColor::FromSRGBColor(LightColor)); PointLightComponent->SetupAttachment(RootComponent); } @@ -29,6 +28,7 @@ void APickup::BeginPlay() Super::BeginPlay(); SphereComponent->OnComponentBeginOverlap.AddDynamic(this, &APickup::OnOverlapBegin); + PointLightComponent->SetLightColor(FLinearColor::FromSRGBColor(LightColor)); PointLightComponent->SetWorldLocation(this->GetActorLocation()); } diff --git a/Source/Nakatomi/Pickup.h b/Source/Nakatomi/Pickup.h index 7519ab3..a9135dc 100644 --- a/Source/Nakatomi/Pickup.h +++ b/Source/Nakatomi/Pickup.h @@ -8,6 +8,8 @@ #include "GameFramework/Actor.h" #include "Pickup.generated.h" + +// TODO: We probably want to add some extra stuff here, particle effects, sounds, etc UCLASS() class NAKATOMI_API APickup : public AActor {