Add PointLightComponent to WeaponPickup
This commit is contained in:
parent
11724a9426
commit
f1c2ac0ec6
|
@ -16,6 +16,11 @@ AWeaponPickup::AWeaponPickup()
|
|||
SphereComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndProbe);
|
||||
|
||||
SphereComponent->SetupAttachment(RootComponent);
|
||||
|
||||
PointLightComponent = CreateDefaultSubobject<UPointLightComponent>(TEXT("PointLightComponent"));
|
||||
PointLightComponent->SetLightColor(FLinearColor::White);
|
||||
PointLightComponent->SetupAttachment(RootComponent);
|
||||
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <Components/PointLightComponent.h>
|
||||
#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();
|
||||
|
|
Loading…
Reference in New Issue