diff --git a/Source/Nakatomi/WeaponPickup.cpp b/Source/Nakatomi/WeaponPickup.cpp index 75bbffb..f7125b3 100644 --- a/Source/Nakatomi/WeaponPickup.cpp +++ b/Source/Nakatomi/WeaponPickup.cpp @@ -16,6 +16,11 @@ AWeaponPickup::AWeaponPickup() SphereComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndProbe); SphereComponent->SetupAttachment(RootComponent); + + PointLightComponent = CreateDefaultSubobject(TEXT("PointLightComponent")); + PointLightComponent->SetLightColor(FLinearColor::White); + PointLightComponent->SetupAttachment(RootComponent); + } // Called when the game starts or when spawned diff --git a/Source/Nakatomi/WeaponPickup.h b/Source/Nakatomi/WeaponPickup.h index 9b6a09d..49f6fe8 100644 --- a/Source/Nakatomi/WeaponPickup.h +++ b/Source/Nakatomi/WeaponPickup.h @@ -2,6 +2,7 @@ #pragma once +#include #include "Components/SphereComponent.h" #include "CoreMinimal.h" #include "GameFramework/Actor.h" @@ -47,6 +48,9 @@ private: FWeaponProperties WeaponProperties; + UPROPERTY() + UPointLightComponent* PointLightComponent; + public: // Sets default values for this actor's properties AWeaponPickup();