#pragma once #include "CoreMinimal.h" #include "AmmoDrivenWeapon.h" #include "ChargeChangedSignatureDelegate.h" #include "ChargedWeapon.generated.h" class UAnimMontage; class UFXSystemAsset; class UFXSystemComponent; class USoundCue; UCLASS(Abstract, Blueprintable) class AChargedWeapon : public AAmmoDrivenWeapon { GENERATED_BODY() public: UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FChargeChangedSignature OnChargeChanged; UPROPERTY(BlueprintAssignable, BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FChargeChangedSignature OnHeatChanged; protected: UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UAnimMontage* FP_OverheatAnim; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UAnimMontage* WeaponOverheatAnim; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UAnimMontage* FP_ChargeupMontage; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UAnimMontage* TP_ChargeupMontage; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UFXSystemAsset* ChargeupParticles; UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true)) UFXSystemComponent* ChargeupParticleInstance; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UFXSystemAsset* ChargeupFireMuzzleFlash; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) USoundCue* NormalFiresound; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) USoundCue* FullyChargedFireSound; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float ChargeSpeed; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_Charging, meta=(AllowPrivateAccess=true)) bool Charging; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) float ChargeProgress; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) int32 ShotCostAtBelowFullCharge; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) int32 ShotCostAtFullCharge; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool ChargedShotsOnly; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool AutoFireWhenOverheated; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) float TotalHeat; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float CoolingRate; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float HeatPerSecondWhileCharging; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float HeatPerSecondWhenCharged; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float HeatPerNormalShot; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float HeatPerChargedShot; public: AChargedWeapon(); virtual void GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const override; protected: UFUNCTION(BlueprintCallable) void SetOverheated(bool isOverheated); UFUNCTION(BlueprintCallable, Reliable, Server) void Server_SetIsCharging(bool isCharging); UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) void RecieveStoppedCharging(float NewChargeProgress); UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) void RecieveStartedCharging(); public: UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) void RecieveChargeProgressChanged(float NewChargeProgress); UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) void ReceiveOverheatedChanged(bool isOverheated); protected: UFUNCTION(BlueprintCallable) void OnRep_Charging(); public: UFUNCTION(BlueprintCallable, BlueprintPure) bool GetIsCharging() const; };