DRG-Femboy-Voice/Source/FSD/Public/WeaponHitCounterComponent.h
2025-04-15 12:39:31 -07:00

42 lines
1.2 KiB
C++
Executable file

#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "WeaponHitCounterComponent.generated.h"
class AActor;
class UFSDPhysicalMaterial;
class UHealthComponentBase;
class UPrimitiveComponent;
class UWeaponHitCountEffect;
UCLASS(Blueprintable, ClassGroup=Custom, meta=(BlueprintSpawnableComponent))
class UWeaponHitCounterComponent : public UActorComponent {
GENERATED_BODY()
public:
protected:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true))
UWeaponHitCountEffect* HitEffect;
UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true))
bool RequiresWeakpointHit;
public:
UWeaponHitCounterComponent();
protected:
UFUNCTION(BlueprintCallable, Reliable, Server)
void Server_OnReloading();
UFUNCTION(BlueprintCallable)
void OnTargetDamaged(UHealthComponentBase* Health, float Amount, UPrimitiveComponent* HitComponent, UFSDPhysicalMaterial* PhysicalMaterial);
UFUNCTION(BlueprintCallable)
void OnStoppedUsing();
UFUNCTION(BlueprintCallable)
void OnReloading();
UFUNCTION(NetMulticast, Unreliable)
void All_ShowDamageEffects(const TArray<TWeakObjectPtr<AActor>>& Targets);
};