LEAP Documentation 40220
Documentation for the LEAP project
DeployableStasisTrap.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Deployable.h"
8#include "DeployableStasisTrap.generated.h"
9
10class UAfflictionInstance;
11
12UCLASS()
13class PROJECTX_API ADeployableStasisTrap : public ADeployable
14{
15 GENERATED_UCLASS_BODY()
16
17public:
18 virtual void DeployComplete() override;
19
20 UFUNCTION(BlueprintCallable,BlueprintPure)
21 FORCEINLINE float GetGatheringDuration() const { return GatherDuration; }
22 virtual bool CanOwningWeaponInstanceFire() const override;
23protected:
24 virtual void BeginPlay() override;
25 virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
26 virtual void RaiseCharacters();
27 virtual void ApplyStasisAffliction();
28 virtual void StartStasis();
29
30 UFUNCTION()
31 virtual void OnComponentHit(UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
32 UFUNCTION()
33 virtual void OnComponentOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);
34
35 UFUNCTION(Server, Reliable, WithValidation)
36 void Server_TriggerTrap();
37
38 UFUNCTION(BlueprintCallable)
39 virtual void TriggerTrap();
40
41 UFUNCTION()
42 virtual void OnOverlap(AActor* OverlappedActor, AActor* OtherActor);
43
44 UFUNCTION()
45 virtual void OnOverlapEnd(AActor* OverlappedActor, AActor* OtherActor);
46
47 /*Height the affected players are raised to*/
48 UPROPERTY(EditDefaultsOnly,Category = StasisTrap)
49 float MaxHeight = 0.0f;
50
51 /*How fast affected Characters are raised from the ground*/
52 UPROPERTY(EditDefaultsOnly,Category = StasisTrap)
53 float RisingForce = 0.0f;
54
55 /*How long will the affect gather players to be affected*/
56 UPROPERTY(EditDefaultsOnly, Category = StasisTrap)
57 float GatherDuration = 0.0f;
58
59 /*How long will the affect players be raised from the ground*/
60 UPROPERTY(EditDefaultsOnly, Category = StasisTrap)
61 float RaiseDuration = 0.0f;
62
63 /*How long will the stasis affect persist*/
64 UPROPERTY(EditDefaultsOnly, Category = StasisTrap)
65 float AffectDuration = 0.0f;
66
67 UPROPERTY(EditDefaultsOnly, Category = StasisTrap)
68 TSubclassOf<UAfflictionInstance> StasisAffliction;
69
70 /*WeaponInstance used to spawn this*/
71 UPROPERTY(EditDefaultsOnly, Category = StasisTrap)
72 TSubclassOf<UWeaponInstance> WeaponInstance;
73
74 bool bGathering = false;
75
76 FTimerHandle GatherTimerHandle;
77 FTimerHandle StasisTimerHandle;
78
79 int32 RaiseInterpolaterID = 0;
80
81 TArray<TWeakObjectPtr<AProjectXCharacter>> AffectedCharacters;
82
83 UPROPERTY(EditDefaultsOnly,Category = StasisTrap)
84 UStaticMeshComponent* RootMeshComponent;
85};
Definition: Deployable.h:47
Definition: DeployableStasisTrap.h:14
Definition: ProjectXCharacter.h:128
Definition: WeaponInstance.h:220