5#include "CoreMinimal.h"
8#include "PlayerCharacterShootingComponent.generated.h"
10UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent) )
16 UPlayerCharacterShootingComponent();
19 virtual
void OwnerDeath() override;
21 UFUNCTION(BlueprintCallable, Category="Weapon
System|ADS")
22 virtual FTransform GetAimDownSightSocket();
23 UFUNCTION(BlueprintCallable, Category = "Weapons|ADS")
24 virtual
float GetWeaponFOV() const;
26 UFUNCTION(BlueprintCallable, Category = "Weapons|ADS")
27 void HitMarker(const AActor* ActorHit, const
float Damage, const UDamageType* DamageType, const FName HitBone, const FVector HitLocation, const
bool bKillingHit = false, const
bool bInjuredPart = false) const;
32 virtual
void SetupComponentWidgets() override;
33 virtual
void ComponentSetupComplete() override;
34 virtual
void TickComponent(
float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
35 virtual
void OnComponentDestroyed(
bool bDestroyingHierarchy) override;
40 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System")
41 int32 MaxNumOfWeaponsDisplayed = 2;
46 virtual
void RecoilStart() override;
47 virtual
void RecoilStop() override;
48 virtual
void RecoilRecoveryStart() override;
49 virtual
void RecoilRecoveryTimer() override;
51 virtual
void RecoilTick(const
float DeltaTime) override;
53 void ActiveRecoilTick();
54 void ActiveRecoilRecoveryTick();
55 virtual
void RecoilTimer() override;
57 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
58 bool bUseRecoilTick = false;
59 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
60 bool bUseRecoilVersionB = false;
61 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
62 float RecoilIncrement = 1.0f;
63 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
64 float RecoveryIncrement = 1.0f;
65 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
66 float RecoveryMultiplier = 1.0f;
67 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
68 float RecoilMaxThreshold = 1.0f;
71 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
72 float RecoilFullTime = 8.0f;
74 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
75 float InterpSpeed = 10.0f;
77 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
78 float FireTimerSpeed = 10.0f;
79 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
80 bool bUseRecoilCurve = true;
81 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
82 float RecoilRecoveryTime = 10.0f;
83 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
84 float RecoilFireRateMultiplier = 2.0f;
86 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
87 float RecoilRecoveryAutoTime = 0.1f;
88 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
89 float RecoilRecoveryNegative = 1.0f;
90 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
91 float RecoilRecoveryAutoNegative = 2.0f;
92 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Weapon
System|Recoil")
93 float RecoilRecoveryTolerance = 0.1f;
98 FRotator RecoilStartRot;
100 FRotator RecoilEndRot;
104 FRotator RecoilDeltaRot;
107 FRotator PlayerDeltaRot;
109 UPROPERTY(BlueprintReadWrite)
110 FRotator RecoilDelta;
115 UPROPERTY(VisibleAnywhere, Category = "Weapon
System|Recoil")
117 UPROPERTY(VisibleAnywhere, Category = "Weapon
System|Recoil")
118 bool bRecoilRecovery;
119 UPROPERTY(VisibleAnywhere, Category = "Weapon
System|Recoil")
120 bool bStoreStartRecoilPosition = true;
122 UPROPERTY(VisibleAnywhere, Category="Weapon
System|Recoil")
123 float CurrentRecoilTime = 0.0f;
124 UPROPERTY(VisibleAnywhere, Category="Weapon
System|Recoil")
125 float FullRecoilTime = 0.0f;
127 UPROPERTY(VisibleAnywhere, Category="Weapon
System|Recoil")
128 float CurrentRecoveryTime = 0.0f;
130 FTimerHandle RecoilRecoveryTimerHandle;
131 FTimerHandle FireTimerHandle;
134 FTimerHandle ActiveRecoilRecoveryTimerHandle;
139 void SetupWeaponWidget();
140 void SetupWeaponCrosshairWidget();
144 void AmmoChanged(const int32 CurrentAmmo, const int32 TotalAmmo);
146 void WeaponEquipped(const TArray<
FWeaponData_T>& Weapons, int32 Index);
151 void BulletShot(
float RecoilAmount);
159 UPROPERTY(EditAnywhere, Category="Weapon
System|Widgets")
160 TSoftClassPtr<class UUserWidget> WeaponWidgetClass;
161 UPROPERTY(EditAnywhere, Category="Weapon
System|Widgets")
162 TSoftClassPtr<class UUserWidget> CrosshairWidgetClass;
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition CrosshairInterface.h:20
Definition WeaponHUDInterface.h:18
Component responsible for managing the shooting behavior of a character.
A struct that represents the state of a player's weapon.
Definition WeaponStructs.h:118
Struct representing data of a weapon that changes.
Definition WeaponStructs.h:861