:(
This commit is contained in:
54
Source/Aura/Public/Actor/AuraProjectile.h
Normal file
54
Source/Aura/Public/Actor/AuraProjectile.h
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user