Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
GC_WeaponDonation.h
이 파일의 문서화 페이지로 가기
1#pragma once
2
3#include "CK_UE.h"
4#include "GameplayCueNotify_Static.h"
5#include "GameplayAbilitySpecHandle.h"
6#include "Data/UI/UIContext.h"
8#include "GC_WeaponDonation.generated.h"
9
10class UAbilitySystemComponent;
11
12
14enum class EWeaponDonationState : uint8
15{
16 Ready = 1,
18 Handoff,
19 Ended,
21 Launch
22};
23
24
25USTRUCT()
27{
28 GENERATED_BODY()
29
30public:
31 float Height = 0.0f;
33 float WidthScale = 1.0f;
34 FVector2D Center = FVector2D::ZeroVector;
35 FRotator Rotation = FRotator::ZeroRotator;
36};
37
38
40UCLASS()
41class CK_UE_API UWeaponDonationRequest : public UObject
42{
43 GENERATED_BODY()
44
45public:
47 void SendEvent(UAbilitySystemComponent* ASC, EWeaponDonationState State) const;
48
49
51 void Initialize(FGameplayTag InWeaponTag, UAbilitySystemComponent* ASC, FGameplayAbilitySpecHandle InAbilityHandle);
53 bool ActivateAbility();
55 UFUNCTION()
56 void Cancel();
58 void Close();
59 bool MatchesAbility(const UAbilitySystemComponent* ASC, FGameplayAbilitySpecHandle Handle) const;
60
61
62 FGameplayTag GetWeaponTag() const
63 {
64 return WeaponTag;
65 }
66
67
68 bool IsOpen() const
69 {
70 return bOpen;
71 }
72
73
75 {
76 return bPresentationStarted;
77 }
78
79
81 {
82 bPresentationStarted = true;
83 }
84
85
87 {
88 ScreenPose = InPose;
89 }
90
91
93 {
94 return ScreenPose;
95 }
96
97private:
99 UFUNCTION()
100 void OnAvatarEndPlay(AActor* Actor, EEndPlayReason::Type Reason);
101
102 TWeakObjectPtr<UAbilitySystemComponent> OwnerASC;
103 TWeakObjectPtr<AActor> OwnerAvatar;
104 FGameplayAbilitySpecHandle AbilityHandle;
105 bool bAbilityRequested = false;
106 FGameplayTag WeaponTag;
108 bool bOpen = true;
109 bool bPresentationStarted = false;
110};
111
112
114UCLASS()
115class CK_UE_API UGC_WeaponDonation : public UGameplayCueNotify_Static
116{
117 GENERATED_BODY()
118
119public:
120 bool IsValidWidgetContext(APawn* Pawn, UUIManagementSubsystem* UI) const;
121 virtual bool OnExecute_Implementation(AActor* MyTarget, const FGameplayCueParameters& Parameters) const override;
122
123protected:
125 virtual void DeriveGameplayCueTagFromAssetName() override
126 {
127 GameplayCueName = GameplayCueTag.GetTagName();
128 }
129
130protected:
131 UPROPERTY(EditDefaultsOnly, Category = "Donation")
132 FUIContext DonationWidgetContext;
133};
EWeaponDonationState
Definition GC_WeaponDonation.h:15
Definition GC_WeaponDonation.h:116
virtual void DeriveGameplayCueTagFromAssetName() override
Definition GC_WeaponDonation.h:125
Definition UIManagementSubsystem.h:28
Definition GC_WeaponDonation.h:42
bool HasPresentationStarted() const
Definition GC_WeaponDonation.h:74
const FWeaponDonationScreenPose & GetScreenPose() const
Definition GC_WeaponDonation.h:92
void SetScreenPose(const FWeaponDonationScreenPose &InPose)
Definition GC_WeaponDonation.h:86
void MarkPresentationStarted()
Definition GC_WeaponDonation.h:80
bool IsOpen() const
Definition GC_WeaponDonation.h:68
FGameplayTag GetWeaponTag() const
Definition GC_WeaponDonation.h:62
Definition UIContext.h:10
Definition GC_WeaponDonation.h:27