5#include "CoreMinimal.h"
6#include "Components/ActorComponent.h"
8#include "WeaponEffectsComponent.generated.h"
13UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent))
14class WEAPONSYSTEM_API UWeaponEffectsComponent :
public UActorComponent
19 UWeaponEffectsComponent();
21 UFUNCTION(BlueprintCallable, Category="Weapon|Effects")
22 bool SetupEffectsComponent(APawn* OwningPawn, USceneComponent* WeaponMuzzle, const FString& WeaponID);
23 UFUNCTION(
Server, Reliable, Category="Weapon|Effects")
24 void Server_SetupEffectsComponent(APawn* OwningPawn, USceneComponent* WeaponMuzzle, const FString& WeaponID);
26 UFUNCTION(BlueprintCallable, Category="Weapon|Effects|Sounds")
27 void PlayWeaponDryFire();
28 UFUNCTION(NetMulticast, Unreliable, BlueprintCallable, Category="Weapon|Effects|Sounds")
29 void Multicast_PlayWeaponDryFire(USoundBase* SoundToPlay);
31 UFUNCTION(BlueprintCallable, Category="Weapon|Effects|Sounds")
32 void WeaponFireNoiseEvent(const
bool bSilencedWeapon = false);
33 UFUNCTION(NetMulticast, Unreliable, BlueprintCallable, Category="Weapon|Effects|Sounds")
34 void Multicast_WeaponFireNoiseEvent(USoundBase* SoundToPlay);
36 UFUNCTION(BlueprintCallable, Category="Weapon|Effects")
37 void WeaponDamageEvent(AActor* DamagedActor, const
float DamageAmount, const FVector& EventLocation, const FVector& HitLocation, const FName& Tag = NAME_None);
39 UFUNCTION(BlueprintCallable, Category="Weapon|Effects|Sounds")
40 void ImpactNoiseEvent(const FVector&
Location, APawn* Instigator, const
bool bSilencedWeapon = false);
42 UFUNCTION(BlueprintCallable, Category="Weapon|Effects|VFX")
43 void MuzzleFlashEvent(const FVector& Offset);
44 UFUNCTION(NetMulticast, Unreliable, BlueprintCallable, Category="Weapon|Effects|VFX")
45 void Multicast_MuzzleFlashEvent(const FVector& Offset, class UNiagaraSystem* ParticleSystem);
47 UFUNCTION(BlueprintCallable, Category="Weapon|Effects|VFX")
48 void TracerEvent(const TArray<FVector>& HitLocations);
49 UFUNCTION(NetMulticast, BlueprintCallable, Unreliable, Category="Weapon|Effects|VFX")
50 void Multicast_TracerEvent(const TArray<FVector>& HitLocations, class UNiagaraSystem* ParticleSystem);
52 UFUNCTION(BlueprintCallable, Category="Weapon|Effects|VFX")
53 void ImpactEvent(const FHitResult&
Hit);
54 UFUNCTION(NetMulticast, BlueprintCallable, Unreliable, Category="Weapon|Effects|VFX")
55 void Multicast_ImpactEvent(const FHitResult&
Hit);
58 UFUNCTION(BlueprintCallable, Category="Weapon|Effects|Feedback")
59 void PlayFeedbackEffects(APlayerController* OwnerPlayerController, const
EWeaponFireMode WeaponFireMode, const
float Accuracy);
62 UFUNCTION(BlueprintCallable, Category="Weapon|Effects")
63 void GetWeaponEffectsFromID(const FString& WeaponID);
67 virtual
void BeginPlay() override;
69 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon|Effects|Debugging")
70 bool bDebuggingMode = false;
72 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon|Effects|VFX")
75 UPROPERTY(Replicated, VisibleAnywhere, BlueprintReadWrite, Category="Weapon|Effects")
76 USceneComponent* MuzzlePoint =
nullptr;
79 UPROPERTY(VisibleAnywhere, Category="Weapon|Effects")
82 void LogDebugMessage(const FString& Message, const
bool bError = false) const;
84 bool bPlayerOwned = false;
85 UPROPERTY(VisibleAnywhere)
86 APawn* OwnerPawn =
nullptr;
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
DECLARE_LOG_CATEGORY_EXTERN(LogWeaponEffects, Display, All)
EWeaponFireMode
Enum class representing the different fire modes for a weapon.
Definition WeaponStructs.h:99
Definition WeaponImpactEffectsSpawner.h:14
Definition WeaponStructs.h:386