#pragma once #include "CoreMinimal.h" #include "GameFramework/Actor.h" #include "EInputKeys.h" #include "DetPack.generated.h" class ADetPackItem; class APlayerCharacter; class UExplosionComponent; class UHealthComponentBase; class UProjectileMovementComponent; class USimpleHealthComponent; class USingleUsableComponent; UCLASS(Blueprintable) class ADetPack : public AActor { GENERATED_BODY() public: protected: UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float UpgradedStaggerChance; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float UpgradedStaggerDuration; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float UpgradedFearFactor; UPROPERTY(BlueprintReadWrite, EditAnywhere, Replicated, Transient, meta=(AllowPrivateAccess=true)) float VisualDamageRadius; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) float IncreasedFearRadius; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) float IncreasedStaggerRadius; UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true)) UProjectileMovementComponent* Movement; UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true)) UExplosionComponent* Explosion; UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true)) USingleUsableComponent* UseComp; UPROPERTY(BlueprintReadWrite, EditAnywhere, Instanced, meta=(AllowPrivateAccess=true)) USimpleHealthComponent* SimpleHealth; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) ADetPackItem* Detonator; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_HasExploded, meta=(AllowPrivateAccess=true)) bool HasExploded; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, ReplicatedUsing=OnRep_IsMoving, meta=(AllowPrivateAccess=true)) bool IsMoving; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) bool ExplodesOnDeath; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) bool HasExtraStaggerRadius; UPROPERTY(BlueprintReadWrite, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) bool HasExtraFearRadius; public: ADetPack(); virtual void GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const override; protected: UFUNCTION(BlueprintCallable) void UseFearStaggerUpgrades(); UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) void RecieveHitObject(); UFUNCTION(BlueprintCallable) void OnRep_IsMoving(); UFUNCTION(BlueprintCallable) void OnRep_HasExploded(); UFUNCTION(BlueprintCallable, BlueprintImplementableEvent) void OnExploded(); UFUNCTION(BlueprintCallable) void OnDetPackPickedUp(APlayerCharacter* User, EInputKeys Key); public: UFUNCTION(BlueprintCallable) void OnDetPackDeath(UHealthComponentBase* HealthComponent); };