5#include "CoreMinimal.h"
7#include "WeaponInstanceControlled.generated.h"
18 GENERATED_UCLASS_BODY()
22 virtual bool CanEquip()
const override;
23 virtual bool Equip()
override;
25 virtual bool Fire(uint8
Mode,
float WorldTimeOverride)
override;
26 virtual bool CanUnEquip(
bool bTestOnly =
false)
const override;
27 virtual bool CanQueueUnEquip()
const override;
28 virtual bool UnEquip(
bool bForce =
false)
override;
29 virtual void UnEquipComplete()
override;
30 virtual void OwnerDied()
override;
31 virtual void StopAllActions()
override;
33 UFUNCTION(BlueprintPure, Category =
"Controlled Weapon")
34 FORCEINLINE
bool IsControllingDeployable()
const {
return bIsControllingDeployable; }
35 UFUNCTION(BlueprintPure, Category =
"Controlled Weapon")
36 FORCEINLINE
bool IsWaitingForControlStop()
const {
return bIsWaitingForControlStop; }
39 virtual void OnDeployableSpawned(
ADeployable* DeployedActor)
override;
40 virtual void OnDeployableDestroyed(
ADeployable* DeployedActor)
override;
41 virtual void FireComplete(uint8
Mode)
override;
43 virtual void StartDeployableControl(
ADeployable*
const DeployableToControl);
44 virtual void OnStartDeployableControlFinished();
45 virtual void StopDeployableControl(
bool bForcePrematureEnd =
false);
46 virtual void OnStopDeployableControlFinished();
47 virtual void MoveDeployablesForward(
float Value);
48 virtual void MoveDeployablesRight(
float Value);
49 virtual void MoveDeployablesUp(
float Value);
52 void OnDeployableDeploymentComplete(
ADeployable* Deployable);
53 UFUNCTION(BlueprintPure, Category = "Controlled
Weapon")
54 ADeployableControllable* GetCurrentlyControlledDeployable()
const {
return CurrentlyControllingDeployable.IsValid()? CurrentlyControllingDeployable.Get() : NULL;}
55 UFUNCTION(BlueprintPure, Category =
"Controlled Weapon")
56 UUserWidget* GetDeployableOverlayWidget()
const {
return DeployableOverlayWidget.IsValid() ? DeployableOverlayWidget.Get() : NULL;}
57 UFUNCTION(BlueprintCallable)
58 virtual void FinishDeathAnimation();
59 UFUNCTION(BlueprintImplementableEvent)
61 UFUNCTION(BlueprintImplementableEvent)
62 void K2_OnDeployableControlStop();
63 UFUNCTION(BlueprintImplementableEvent)
64 void K2_OnDeployableControlStopFinished();
66 UPROPERTY(EditDefaultsOnly, Category = "Controlled
Weapon")
67 TArray<TSubclassOf<UAfflictionInstance>> AfflictionsToApplyToOwner;
68 UPROPERTY(EditDefaultsOnly, Category = "Controlled
Weapon")
69 TSubclassOf<UUserWidget> DeployableOverlayWidgetClass =
nullptr;
70 UPROPERTY(EditDefaultsOnly, Category = "Controlled
Weapon")
71 float CameraBlendInTime = 0.f;
72 UPROPERTY(EditDefaultsOnly, Category = "Controlled
Weapon")
73 float CameraBlendOutTime = 0.f;
74 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Controlled
Weapon")
75 float DeathAnimationDuration = 2.f;
76 UPROPERTY(EditDefaultsOnly, Category = "Controlled
Weapon")
77 bool bStopControllingOnRefire = false;
78 UPROPERTY(EditDefaultsOnly, Category = "Controlled
Weapon")
79 bool bCanUnequipWhileDeploying = false;
80 bool bIsWaitingForControlStop = false;
83 TWeakObjectPtr<UUserWidget> DeployableOverlayWidget =
nullptr;
84 TArray<TWeakObjectPtr<UAfflictionInstance>> AfflictionsApplied;
85 FRotator CachedRotator = FRotator::ZeroRotator;
90 bool bIsControllingDeployable = false;
92 FTimerHandle DeathAnimationTimerHandle;
EWeaponError
Definition: WeaponComponent.h:15
Definition: DeployableControllable.h:30
virtual void BeginPlay() override
Definition: DeployableControllable.cpp:25
virtual void Fire()
Definition: DeployableControllable.h:39
Definition: Deployable.h:47
Definition: WeaponInstanceControlled.h:17
Definition: WeaponInstanceSpawnable.h:17