Space Plunder
Loading...
Searching...
No Matches
ALSMantleComponent.h
Go to the documentation of this file.
1// Copyright: Copyright (C) 2022 Doğa Can Yanıkoğlu
2// Source Code: https://github.com/dyanikoglu/ALS-Community
3
4#pragma once
5
6#include "CoreMinimal.h"
7
9#include "Components/ActorComponent.h"
10#include "Kismet/KismetSystemLibrary.h"
11
12#include "ALSMantleComponent.generated.h"
13
14// forward declarations
16
17
18UCLASS(Blueprintable, BlueprintType)
19class ALSV4_CPP_API UALSMantleComponent : public UActorComponent
20{
21 GENERATED_BODY()
22
23public:
25
26 UFUNCTION(BlueprintCallable, Category = "ALS|Mantle System")
27 bool MantleCheck(const FALSMantleTraceSettings& TraceSettings,
28 EDrawDebugTrace::Type DebugType);
29
30 UFUNCTION(BlueprintCallable, Category = "ALS|Mantle System")
31 void MantleStart(float MantleHeight, const FALSComponentAndTransform& MantleLedgeWS,
32 EALSMantleType MantleType);
33
34 UFUNCTION(BlueprintCallable, Category = "ALS|Mantle System")
35 void MantleUpdate(float BlendIn);
36
37 UFUNCTION(BlueprintCallable, Category = "ALS|Mantle System")
38 void MantleEnd();
39
40 UFUNCTION(BlueprintCallable, Category = "ALS|Mantle System")
41 void OnOwnerJumpInput();
42
43 UFUNCTION(BlueprintCallable, Category = "ALS|Mantle System")
44 void OnOwnerRagdollStateChanged(bool bRagdollState);
45
47 UFUNCTION(BlueprintImplementableEvent, BlueprintCallable, Category = "ALS|Mantle System")
48 FALSMantleAsset GetMantleAsset(EALSMantleType MantleType, EALSOverlayState CurrentOverlayState);
49
50
51 //- Custom Added //
52 UFUNCTION(BlueprintCallable, Category = "ALS|Mantle System")
53 bool IsMantlePlaying(){if(MantleTimeline == nullptr){return false;}return MantleTimeline->IsPlaying();};
54
55protected:
56 virtual void TickComponent(float DeltaTime, ELevelTick TickType,
57 FActorComponentTickFunction* ThisTickFunction) override;
58
59 // Called when the game starts
60 virtual void BeginPlay() override;
61
63 UFUNCTION(BlueprintCallable, Server, Reliable, Category = "ALS|Mantle System")
64 void Server_MantleStart(float MantleHeight, const FALSComponentAndTransform& MantleLedgeWS,
65 EALSMantleType MantleType);
66
67 UFUNCTION(BlueprintCallable, NetMulticast, Reliable, Category = "ALS|Mantle System")
68 void Multicast_MantleStart(float MantleHeight, const FALSComponentAndTransform& MantleLedgeWS,
69 EALSMantleType MantleType);
70
71protected:
72 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "ALS|Mantle System")
73 TObjectPtr<UTimelineComponent> MantleTimeline = nullptr;
74
75 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Mantle System")
76 FALSMantleTraceSettings GroundedTraceSettings;
77
78 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Mantle System")
79 FALSMantleTraceSettings AutomaticTraceSettings;
80
81 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Mantle System")
82 FALSMantleTraceSettings FallingTraceSettings;
83
84 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Mantle System")
85 TObjectPtr<UCurveFloat> MantleTimelineCurve;
86
87 static FName NAME_IgnoreOnlyPawn;
89 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Mantle System")
90 FName MantleObjectDetectionProfile = NAME_IgnoreOnlyPawn;
91
92 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Mantle System")
93 TEnumAsByte<ECollisionChannel> WalkableSurfaceDetectionChannel = ECC_Visibility;
94
95 UPROPERTY(BlueprintReadOnly, Category = "ALS|Mantle System")
96 FALSMantleParams MantleParams;
97
98 UPROPERTY(BlueprintReadOnly, Category = "ALS|Mantle System")
100
101 UPROPERTY(BlueprintReadOnly, Category = "ALS|Mantle System")
102 FTransform MantleTarget = FTransform::Identity;
103
104 UPROPERTY(BlueprintReadOnly, Category = "ALS|Mantle System")
105 FTransform MantleActualStartOffset = FTransform::Identity;
106
107 UPROPERTY(BlueprintReadOnly, Category = "ALS|Mantle System")
108 FTransform MantleAnimatedStartOffset = FTransform::Identity;
109
111 UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "ALS|Mantle System")
112 float AcceptableVelocityWhileMantling = 10.0f;
113
114private:
115 UPROPERTY()
117
118 UPROPERTY()
119 TObjectPtr<UALSDebugComponent> ALSDebugComponent = nullptr;
120
121 UPROPERTY()
122 bool bPhysicActor = false;
123};
EALSMantleType
Definition ALSCharacterEnumLibrary.h:161
EALSOverlayState
Definition ALSCharacterEnumLibrary.h:68
UCLASS(Blueprintable, BlueprintType, ClassGroup=(BucciGames), meta=(BlueprintSpawnableComponent)) class CHATSYSTEM_API UChatSystemComponent
Definition ChatSystemComponent.h:13
Definition ALSBaseCharacter.h:38
Definition ALSDebugComponent.h:17
virtual void BeginPlay() override
Definition ALSDebugComponent.cpp:128
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
Definition ALSDebugComponent.cpp:31
TObjectPtr< AALSBaseCharacter > OwnerCharacter
Definition ALSDebugComponent.h:138
Definition ALSMantleComponent.h:20
Definition ALSCharacterStructLibrary.h:31
Definition ALSCharacterStructLibrary.h:101
Definition ALSCharacterStructLibrary.h:134
Definition ALSCharacterStructLibrary.h:155