54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "GameplayEffectTypes.h"
|
|
#include "AuraProjectile.generated.h"
|
|
|
|
class UNiagaraSystem;
|
|
class USphereComponent;
|
|
class UProjectileMovementComponent;
|
|
|
|
UCLASS()
|
|
class AURA_API AAuraProjectile : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
AAuraProjectile();
|
|
|
|
UPROPERTY(VisibleAnywhere)
|
|
TObjectPtr<UProjectileMovementComponent> ProjectileMovement;
|
|
|
|
UPROPERTY(BlueprintReadWrite, meta = (ExposeOnSpawn = true))
|
|
FGameplayEffectSpecHandle DamageEffectSpecHandle;
|
|
|
|
protected:
|
|
virtual void BeginPlay() override;
|
|
virtual void Destroyed() override;
|
|
|
|
UFUNCTION()
|
|
void OnSphereOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
|
|
private:
|
|
|
|
UPROPERTY(EditDefaultsOnly)
|
|
float LifeSpan = 15.f;
|
|
|
|
bool bHit = false;
|
|
|
|
UPROPERTY(VisibleAnywhere)
|
|
TObjectPtr<USphereComponent> Sphere;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
TObjectPtr<UNiagaraSystem> ImpactEffect;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
TObjectPtr<USoundBase> ImpactSound;
|
|
|
|
UPROPERTY(EditAnywhere)
|
|
TObjectPtr<USoundBase> LoopingSound;
|
|
|
|
UPROPERTY()
|
|
TObjectPtr<UAudioComponent> LoopingSoundComponent;
|
|
}; |