Add PointLightComponent to WeaponPickup
This commit is contained in:
parent
11724a9426
commit
f1c2ac0ec6
|
@ -16,6 +16,11 @@ AWeaponPickup::AWeaponPickup()
|
||||||
SphereComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndProbe);
|
SphereComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndProbe);
|
||||||
|
|
||||||
SphereComponent->SetupAttachment(RootComponent);
|
SphereComponent->SetupAttachment(RootComponent);
|
||||||
|
|
||||||
|
PointLightComponent = CreateDefaultSubobject<UPointLightComponent>(TEXT("PointLightComponent"));
|
||||||
|
PointLightComponent->SetLightColor(FLinearColor::White);
|
||||||
|
PointLightComponent->SetupAttachment(RootComponent);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <Components/PointLightComponent.h>
|
||||||
#include "Components/SphereComponent.h"
|
#include "Components/SphereComponent.h"
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "GameFramework/Actor.h"
|
#include "GameFramework/Actor.h"
|
||||||
|
@ -47,6 +48,9 @@ private:
|
||||||
|
|
||||||
FWeaponProperties WeaponProperties;
|
FWeaponProperties WeaponProperties;
|
||||||
|
|
||||||
|
UPROPERTY()
|
||||||
|
UPointLightComponent* PointLightComponent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Sets default values for this actor's properties
|
// Sets default values for this actor's properties
|
||||||
AWeaponPickup();
|
AWeaponPickup();
|
||||||
|
|
Loading…
Reference in New Issue