Payback 0.0.1
CK Graduation Project
로딩중...
검색중...
일치하는것 없음
UGA_Skill_StrikeBase 클래스 참조

#include <GA_Skill_StrikeBase.h>

UGA_Skill_StrikeBase에 대한 상속 다이어그램 :
Inheritance graph
UGA_Skill_StrikeBase에 대한 협력 다이어그램:
Collaboration graph

Public 멤버 함수

virtual void EndAbility (const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo, bool bReplicateEndAbility, bool bWasCancelled) override
 
- UGA_SkillBase(으)로부터 상속된 Public 멤버 함수
virtual void ActivateAbility (const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo, const FGameplayEventData *TriggerEventData) override
 
virtual void ApplyCooldown (const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo) const override
 
const FGameplayTagContainer * GetCooldownTags () const
 
- UGA_CombatBase(으)로부터 상속된 Public 멤버 함수
virtual void OnGiveAbility (const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilitySpec &Spec) override
 
- UGA_Base(으)로부터 상속된 Public 멤버 함수
 UGA_Base ()
 

Protected 멤버 함수

virtual void ApplyCombatData () override
 
virtual const FSkillStrikeBaseDataFindStrikeData () const
 
bool StartStrikePhaseChain (AMainPlayerCharacter *Player, const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo)
 
virtual void OnPreparingCompleted ()
 
virtual void OnHoldingCompleted ()
 
virtual void OnStrikeMoveCompleted ()
 
virtual void OnStrikeMotionWarpDelayCompleted ()
 
virtual void OnStrikeMontageCompleted ()
 
virtual bool OnStrikeArrived (AMainPlayerCharacter *Player)
 
virtual void OnStrikeMontageStarted ()
 
virtual void SetupStrikeEventListeners ()
 
virtual void OnStrikeCleanup (ACharacter *Character, bool bWasCancelled)
 
virtual TArray< FName > GetRequiredMontageSections () const
 
float GetEffectiveHoldingDuration () const
 
bool PlayHoldingSection (float DesiredHoldingDuration) const
 
void SetCurrentWeaponHidden (bool bHidden) const
 
FORCEINLINE float GetStrikeMoveNormalizationFactor (const float Duration, const float Distance) const
 
FORCEINLINE void RestorePlayerAndWeaponForStrike ()
 
- UGA_SkillBase(으)로부터 상속된 Protected 멤버 함수
virtual bool CheckCost (const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, FGameplayTagContainer *OptionalRelevantTags) const override
 
virtual void ApplyCost (const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo) const override
 
float GetSkillMontageSectionLength (const UAnimMontage *Montage, FName SectionName, bool bApplyPlayRate=false, float PlayRate=1.0f) const
 
bool HasClearStrikePath (const AMainPlayerCharacter *Player, const AActor *TargetActor) const
 
void SetAvatarPawnCollisionResponse (ECollisionResponse Response) const
 
float GetPlayerCurrentWeaponAttackRange () const
 
void SetAvatarMeshHidden (bool bHidden) const
 
void ResetSkillMontagePlayRate () const
 
AActor * GetTargetActor () const
 
UAnimMontage * GetSkillMontage (FGameplayTag PlayMontageTag=FGameplayTag::EmptyTag) const
 
bool ContainsAllMontageSections (const UAnimMontage *Montage, TArray< FName > SectionNames) const
 
template<typename T >
const T * GetExtendedData () const
 
template<typename T >
bool HasExtendedData () const
 
- UGA_CombatBase(으)로부터 상속된 Protected 멤버 함수
void SetupHitCheckListener ()
 
void OnHitCheckStart (FGameplayEventData Payload)
 
void OnHitCheckEnd (FGameplayEventData Payload)
 
void OnTraceResultCallback (const FGameplayAbilityTargetDataHandle &TargetDataHandle, float CombatDataLevel, int32 CombatHitDataIndex)
 
void OnFinisherResultCallback (const FGameplayAbilityTargetDataHandle &TargetDataHandle, float CombatDataLevel, int32 CombatHitDataIndex)
 
virtual TOptional< FTransform > GetTraceTransformForHitCheck () const
 
void ApplyEffectsToSelf (const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo)
 
FCombatHitPayload BuildCombatHitPayload (const FCombatHitData &HitData, float DamageMultiplier, bool bRequestKnockback)
 
TArray< FGameplayEffectSpecHandle > BuildCombatEffectSpecs (const FCombatHitData &HitData, float DamageMultiplier)
 
FGameplayEffectSpecHandle BuildEffectSpec (const FCombatEffectData &EffectData, float CombatDataLevel)
 
void PlayCombatHitAudio (const FVector &HitLocation)
 
void CacheAudioTagComponents ()
 
const FKnockbackDataFindKnockbackData (const FCombatHitData &HitData) const
 
void NotifyCameraHitConfirmed () const
 
float GetAttackSpeedRate () const
 
void UpdateAttackWarpTargetForRange (FName WarpTargetName=FName("Target"))
 
void UpdateAttackWarpTargetForRange (FName WarpTargetName, ITargetableInterface *Target)
 
- UGA_Base(으)로부터 상속된 Protected 멤버 함수
UCharacterMotionWarpingComponentBase * GetMotionWarpingComponent () const
 
void SetupCancelableListener ()
 
void OnCancelableInputDetected (FGameplayEventData Payload)
 
virtual void HandleCancelable (FGameplayEventData Payload)
 
virtual void OnAbilityMontageCompleted ()
 
virtual void OnAbilityMontageInterrupted ()
 
virtual void OnAbilityMontageCancellable ()
 

Protected 속성

virtual bool ComputeStrikeMoveTarget (AMainPlayerCharacter *Player, FVector &OutMoveTarget) PURE_VIRTUAL(UGA_Skill_StrikeBase
 
virtual bool UpdateStrikeWarpTarget () PURE_VIRTUAL(UGA_Skill_StrikeBase
 
FName PreparingSectionName
 
FName HoldingSectionName
 
FName StrikeSectionName
 
bool bIgnorePawnCollisionDuringWarp = true
 
TObjectPtr< UCurveFloat > StrikeMoveProgressCurve
 
float StrikeMoveDuration = 0.25f
 
float HoldingDuration = 0.1f
 
float StrikeMotionWarpDelay = 0.0f
 
TObjectPtr< UAnimMontage > SkillActionMontage
 
TObjectPtr< UAbilityTask_PlayMontageAndWait > ActivePreparingTask
 
TObjectPtr< UAbilityTask_WaitDelay > ActiveHoldingTask
 
TObjectPtr< UAT_MoveToLocationCurveActiveMoveTask
 
TObjectPtr< UAbilityTask_WaitDelay > ActiveStrikeMotionWarpDelayTask
 
FRotator CachedStrikeFacingRotation = FRotator::ZeroRotator
 
bool bStrikeStarted = false
 
bool bCurrentWeaponHiddenBySkill = false
 
float TotalMoveCurveIntegral = 0.0f
 
- UGA_SkillBase(으)로부터 상속된 Protected 속성
FGameplayTag CooldownTag
 
float CostValue
 
float CooldownDuration
 
- UGA_CombatBase(으)로부터 상속된 Protected 속성
TObjectPtr< UCombatDataBaseCombatData
 
float AttackRange = 450.0f
 
float AttackRangeCorrectionDistance = 250.0f
 
float AttackRangeCorrectionInnerOffset = 30.0f
 
TObjectPtr< UAT_TraceActiveTraceTask
 
TArray< TSubclassOf< UGameplayEffect > > SelfEffectClasses
 
FGameplayTag WeaponHitCueTag
 
TArray< TObjectPtr< UAudioEmitterComponent > > CachedAudioTagComponents
 

상세한 설명

Preparing → Holding → 커브 이동 → Strike 몽타주로 이어지는 워프류 스킬 공통 베이스. 자식은 ActivateAbility에서 고유 준비를 마친 뒤 StartStrikePhaseChain을 호출하고, ComputeStrikeMoveTarget / UpdateStrikeWarpTarget 등의 훅으로 고유 로직을 제공한다.

멤버 함수 문서화

◆ ApplyCombatData()

void UGA_Skill_StrikeBase::ApplyCombatData ( )
overrideprotectedvirtual

UGA_SkillBase(으)로부터 재구현되었습니다.

22{
23 Super::ApplyCombatData();
24
25 if (CombatData == nullptr)
26 {
27 return;
28 }
29
30 if (const FSkillStrikeBaseData* Payload = FindStrikeData())
31 {
32 PreparingSectionName = Payload->PreparingSectionName;
33 HoldingSectionName = Payload->HoldingSectionName;
34 StrikeSectionName = Payload->StrikeSectionName;
35 bIgnorePawnCollisionDuringWarp = Payload->bIgnorePawnCollisionDuringWarp;
36 StrikeMoveProgressCurve = Payload->StrikeMoveProgressCurve;
37 StrikeMoveDuration = Payload->StrikeMoveDuration;
38 HoldingDuration = Payload->HoldingDuration;
39 StrikeMotionWarpDelay = Payload->StrikeMotionWarpDelay;
40 }
41
42 TotalMoveCurveIntegral = Math::IntegrateNormalizedCurve(StrikeMoveProgressCurve);
43}
TObjectPtr< UCombatDataBase > CombatData
Definition GA_CombatBase.h:75
float StrikeMotionWarpDelay
Definition GA_Skill_StrikeBase.h:131
FName PreparingSectionName
Definition GA_Skill_StrikeBase.h:105
float StrikeMoveDuration
Definition GA_Skill_StrikeBase.h:123
float TotalMoveCurveIntegral
Definition GA_Skill_StrikeBase.h:154
FName HoldingSectionName
Definition GA_Skill_StrikeBase.h:109
bool bIgnorePawnCollisionDuringWarp
Definition GA_Skill_StrikeBase.h:117
FName StrikeSectionName
Definition GA_Skill_StrikeBase.h:113
float HoldingDuration
Definition GA_Skill_StrikeBase.h:127
TObjectPtr< UCurveFloat > StrikeMoveProgressCurve
Definition GA_Skill_StrikeBase.h:120
virtual const FSkillStrikeBaseData * FindStrikeData() const
Definition GA_Skill_StrikeBase.cpp:46
Definition ExtendedDatas.h:224
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ EndAbility()

void UGA_Skill_StrikeBase::EndAbility ( const FGameplayAbilitySpecHandle  Handle,
const FGameplayAbilityActorInfo *  ActorInfo,
const FGameplayAbilityActivationInfo  ActivationInfo,
bool  bReplicateEndAbility,
bool  bWasCancelled 
)
overridevirtual

UGA_CombatBase(으)로부터 재구현되었습니다.

140{
141 ACharacter* Character = Cast<ACharacter>(ActorInfo ? ActorInfo->AvatarActor.Get() : nullptr);
142
143 if (const AMainPlayerCharacter* Player = Cast<AMainPlayerCharacter>(Character))
144 {
145 UAnimInstance* AnimInst = Player->GetMesh() ? Player->GetMesh()->GetAnimInstance() : nullptr;
146
147 if (AnimInst)
148 {
149 AnimInst->Montage_Stop(0.0f, SkillActionMontage);
150 }
151
152 if (UCharacterMotionWarpingComponentBase* WarpComponent = GetMotionWarpingComponent())
153 {
154 WarpComponent->StopMotionWarp(FName("Target"));
155 }
156 }
157
159 {
161 }
162
163 if (ActiveMoveTask)
164 {
165 ActiveMoveTask->EndTask();
166 ActiveMoveTask = nullptr;
167 }
168
170 {
173 }
174
176 {
177 ActivePreparingTask->EndTask();
178 ActivePreparingTask = nullptr;
179 }
180
182 {
183 ActiveHoldingTask->EndTask();
184 ActiveHoldingTask = nullptr;
185 }
186
188
190 {
192 }
193
195
196 OnStrikeCleanup(Character, bWasCancelled);
197
198 SkillActionMontage = nullptr;
199 bStrikeStarted = false;
200 CachedStrikeFacingRotation = FRotator::ZeroRotator;
201
202 // 워프 동안 Flying으로 전환했던 무브먼트 모드를 복원 — Falling으로 두면 지면에 닿는 순간 Walking으로 자연 전환
203 if (Character)
204 {
205 UCharacterMovementComponent* MoveComp = Character->GetCharacterMovement();
206
207 if (MoveComp && MoveComp->MovementMode == MOVE_Flying)
208 {
209 MoveComp->SetMovementMode(MOVE_Falling);
210 }
211 }
212
213 Super::EndAbility(Handle, ActorInfo, ActivationInfo, bReplicateEndAbility, bWasCancelled);
214}
Definition MainPlayerCharacter.h:39
UCharacterMotionWarpingComponentBase * GetMotionWarpingComponent() const
Definition GA_Base.cpp:33
void ResetSkillMontagePlayRate() const
Definition GA_SkillBase.cpp:235
void SetAvatarPawnCollisionResponse(ECollisionResponse Response) const
Definition GA_SkillBase.cpp:188
FRotator CachedStrikeFacingRotation
Definition GA_Skill_StrikeBase.h:151
void SetCurrentWeaponHidden(bool bHidden) const
Definition GA_Skill_StrikeBase.cpp:489
TObjectPtr< UAT_MoveToLocationCurve > ActiveMoveTask
Definition GA_Skill_StrikeBase.h:145
TObjectPtr< UAbilityTask_WaitDelay > ActiveStrikeMotionWarpDelayTask
Definition GA_Skill_StrikeBase.h:148
virtual void OnStrikeCleanup(ACharacter *Character, bool bWasCancelled)
Definition GA_Skill_StrikeBase.cpp:435
bool bCurrentWeaponHiddenBySkill
Definition GA_Skill_StrikeBase.h:153
TObjectPtr< UAbilityTask_PlayMontageAndWait > ActivePreparingTask
Definition GA_Skill_StrikeBase.h:139
TObjectPtr< UAnimMontage > SkillActionMontage
Definition GA_Skill_StrikeBase.h:135
TObjectPtr< UAbilityTask_WaitDelay > ActiveHoldingTask
Definition GA_Skill_StrikeBase.h:142
bool bStrikeStarted
Definition GA_Skill_StrikeBase.h:152
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ FindStrikeData()

const FSkillStrikeBaseData * UGA_Skill_StrikeBase::FindStrikeData ( ) const
protectedvirtual

UGA_Skill_Strike에서 재구현되었습니다.

47{
48 return CombatData ? CombatData->FindExtendedData<FSkillStrikeBaseData>() : nullptr;
49}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetEffectiveHoldingDuration()

float UGA_Skill_StrikeBase::GetEffectiveHoldingDuration ( ) const
protected
445{
446 const float ConfiguredHoldingDuration = FMath::Max(HoldingDuration, 0.0f);
447
448 if (ConfiguredHoldingDuration > KINDA_SMALL_NUMBER)
449 {
450 return ConfiguredHoldingDuration;
451 }
452
454}
float GetSkillMontageSectionLength(const UAnimMontage *Montage, FName SectionName, bool bApplyPlayRate=false, float PlayRate=1.0f) const
Definition GA_SkillBase.cpp:208
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetRequiredMontageSections()

TArray< FName > UGA_Skill_StrikeBase::GetRequiredMontageSections ( ) const
protectedvirtual

UGA_Skill_Strike에서 재구현되었습니다.

이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ GetStrikeMoveNormalizationFactor()

FORCEINLINE float UGA_Skill_StrikeBase::GetStrikeMoveNormalizationFactor ( const float  Duration,
const float  Distance 
) const
inlineprotected
89 {
90 //Normalizer는 0 ~ Distance 이동 범위를 0 ~ 1로 정규화시키는 값임.
91 const float Normalizer = Duration * TotalMoveCurveIntegral;
92 return Normalizer < KINDA_SMALL_NUMBER ? 0.0f : Distance / Normalizer;
93 }
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnHoldingCompleted()

void UGA_Skill_StrikeBase::OnHoldingCompleted ( )
protectedvirtual
256{
257 ActiveHoldingTask = nullptr;
258
259 AMainPlayerCharacter* Player = Cast<AMainPlayerCharacter>(GetAvatarActorFromActorInfo());
260
261 if (Player == nullptr)
262 {
263 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
264 return;
265 }
266
267 FVector MoveTarget = FVector::ZeroVector;
268
269 if (ComputeStrikeMoveTarget(Player, MoveTarget) == false)
270 {
271 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
272 return;
273 }
274
275 const FVector PlayerLocation = Player->GetActorLocation();
276 const float MoveDistance = (MoveTarget - PlayerLocation).Size();
277
278 // 회전(Yaw)용 평면 방향 — 캐릭터가 Pitch로 기울어지지 않도록 분리
279 FVector ToTargetFlat = MoveTarget - PlayerLocation;
280 ToTargetFlat.Z = 0.0f;
281
282 if (ToTargetFlat.IsNearlyZero())
283 {
284 ToTargetFlat = Player->GetActorForwardVector();
285 ToTargetFlat.Z = 0.0f;
286 }
287
288 CachedStrikeFacingRotation = ToTargetFlat.GetSafeNormal().Rotation();
289 Player->SetActorRotation(CachedStrikeFacingRotation);
290
291 // Holding 대기 이후 root motion 대신 AbilityTask가 위치를 갱신한다.
292 if (UCharacterMovementComponent* MoveComp = Player->GetCharacterMovement())
293 {
294 MoveComp->SetMovementMode(MOVE_Flying);
295 MoveComp->Velocity = FVector::ZeroVector;
296 }
297
298 UCurveFloat* MoveProgressCurve = TotalMoveCurveIntegral < KINDA_SMALL_NUMBER ? nullptr : StrikeMoveProgressCurve;
299 const float NormalizationFactor = GetStrikeMoveNormalizationFactor(StrikeMoveDuration, MoveDistance);
300
302 (
303 this,
304 MoveProgressCurve,
305 MoveTarget,
306 NormalizationFactor,
308 );
309
310 if (MoveTask == nullptr)
311 {
312 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
313 return;
314 }
315
316 ActiveMoveTask = MoveTask;
317 MoveTask->OnCompleted.AddDynamic(this, &ThisClass::OnStrikeMoveCompleted);
318 MoveTask->ReadyForActivation();
319}
Definition AT_MoveToLocationCurve.h:16
FMoveToLocationCurveSignature OnCompleted
Definition AT_MoveToLocationCurve.h:32
static UAT_MoveToLocationCurve * MoveToLocationCurve(UGameplayAbility *OwningAbility, UCurveFloat *InProgressCurve, const FVector &InTargetLocation, float InNormalizationFactor, float InDuration)
Definition AT_MoveToLocationCurve.cpp:16
virtual bool ComputeStrikeMoveTarget(AMainPlayerCharacter *Player, FVector &OutMoveTarget) PURE_VIRTUAL(UGA_Skill_StrikeBase
Definition GA_Skill_StrikeBase.h:62
FORCEINLINE float GetStrikeMoveNormalizationFactor(const float Duration, const float Distance) const
Definition GA_Skill_StrikeBase.h:88
virtual void EndAbility(const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo, bool bReplicateEndAbility, bool bWasCancelled) override
Definition GA_Skill_StrikeBase.cpp:139
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnPreparingCompleted()

void UGA_Skill_StrikeBase::OnPreparingCompleted ( )
protectedvirtual
218{
219 AMainPlayerCharacter* Player = Cast<AMainPlayerCharacter>(GetAvatarActorFromActorInfo());
220
221 if (Player == nullptr)
222 {
223 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
224 return;
225 }
226
227 const float CurrentHoldingDuration = GetEffectiveHoldingDuration();
228
229 if (CurrentHoldingDuration < KINDA_SMALL_NUMBER)
230 {
231 LOG_ERROR(LogCK, "Holding 지속 시간이 유효하지 않아 이동을 시작할 수 없습니다. SectionName: %s", *HoldingSectionName.ToString());
232 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
233 return;
234 }
235
236 if (PlayHoldingSection(CurrentHoldingDuration) == false)
237 {
238 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
239 return;
240 }
241
242 ActiveHoldingTask = UAbilityTask_WaitDelay::WaitDelay(this, CurrentHoldingDuration);
243
244 if (ActiveHoldingTask == nullptr)
245 {
246 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
247 return;
248 }
249
250 ActiveHoldingTask->OnFinish.AddDynamic(this, &ThisClass::OnHoldingCompleted);
251 ActiveHoldingTask->ReadyForActivation();
252}
#define LOG_ERROR(Category, Format,...)
Definition CK_UE.h:40
float GetEffectiveHoldingDuration() const
Definition GA_Skill_StrikeBase.cpp:444
bool PlayHoldingSection(float DesiredHoldingDuration) const
Definition GA_Skill_StrikeBase.cpp:457
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnStrikeArrived()

bool UGA_Skill_StrikeBase::OnStrikeArrived ( AMainPlayerCharacter Player)
protectedvirtual

UGA_Skill_Strike에서 재구현되었습니다.

424{
425 return true;
426}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnStrikeCleanup()

void UGA_Skill_StrikeBase::OnStrikeCleanup ( ACharacter *  Character,
bool  bWasCancelled 
)
protectedvirtual

UGA_Skill_Strike에서 재구현되었습니다.

435{ }
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnStrikeMontageCompleted()

void UGA_Skill_StrikeBase::OnStrikeMontageCompleted ( )
protectedvirtual
418{
420}
virtual void OnAbilityMontageCompleted()
Definition GA_Base.cpp:103
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ OnStrikeMontageStarted()

void UGA_Skill_StrikeBase::OnStrikeMontageStarted ( )
protectedvirtual

UGA_Skill_Strike에서 재구현되었습니다.

429{ }
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnStrikeMotionWarpDelayCompleted()

void UGA_Skill_StrikeBase::OnStrikeMotionWarpDelayCompleted ( )
protectedvirtual
400{
402
403 if (IsActive() == false)
404 {
405 return;
406 }
407
409 {
410 return;
411 }
412
413 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
414}
virtual bool UpdateStrikeWarpTarget() PURE_VIRTUAL(UGA_Skill_StrikeBase
Definition GA_Skill_StrikeBase.h:65
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ OnStrikeMoveCompleted()

void UGA_Skill_StrikeBase::OnStrikeMoveCompleted ( )
protectedvirtual
323{
324 if (bStrikeStarted)
325 {
326 return;
327 }
328
329 bStrikeStarted = true;
330 ActiveMoveTask = nullptr;
331
332 AMainPlayerCharacter* Player = Cast<AMainPlayerCharacter>(GetAvatarActorFromActorInfo());
333
334 if (Player == nullptr)
335 {
336 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
337 return;
338 }
339
341 Player->SetActorRotation(CachedStrikeFacingRotation);
342
343 // 자식이 Strike 몽타주 없이 흐름을 종료 처리한 경우 (예: 무기 타겟 즉시 상호작용)
344 if (OnStrikeArrived(Player) == false)
345 {
346 return;
347 }
348
350
352 {
353 ActivePreparingTask->EndTask();
354 ActivePreparingTask = nullptr;
355 }
356
358 {
359 LOG_ERROR(LogCK, "Strike 섹션을 찾을 수 없어, 실행할 수 없습니다.");
360 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
361 return;
362 }
363
365
366 UAbilityTask_PlayMontageAndWait* StrikeTask = UAbilityTask_PlayMontageAndWait::CreatePlayMontageAndWaitProxy
367 (
368 this,
369 TEXT("StrikeMontage"),
371 1.0f,
373 );
374
375 if (StrikeTask == nullptr)
376 {
377 EndAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true, true);
378 return;
379 }
380
382
383 StrikeTask->OnInterrupted.AddDynamic(this, &ThisClass::OnAbilityMontageInterrupted);
384 StrikeTask->OnCompleted.AddDynamic(this, &ThisClass::OnStrikeMontageCompleted);
385 StrikeTask->ReadyForActivation();
386
387 if (StrikeMotionWarpDelay < KINDA_SMALL_NUMBER)
388 {
390 return;
391 }
392
393 ActiveStrikeMotionWarpDelayTask = UAbilityTask_WaitDelay::WaitDelay(this, StrikeMotionWarpDelay);
394 ActiveStrikeMotionWarpDelayTask->OnFinish.AddDynamic(this, &ThisClass::OnStrikeMotionWarpDelayCompleted);
395 ActiveStrikeMotionWarpDelayTask->ReadyForActivation();
396}
void SetupHitCheckListener()
Definition GA_CombatBase.cpp:62
bool ContainsAllMontageSections(const UAnimMontage *Montage, TArray< FName > SectionNames) const
Definition GA_SkillBase.cpp:303
virtual bool OnStrikeArrived(AMainPlayerCharacter *Player)
Definition GA_Skill_StrikeBase.cpp:423
FORCEINLINE void RestorePlayerAndWeaponForStrike()
Definition GA_Skill_StrikeBase.h:95
virtual void OnStrikeMontageStarted()
Definition GA_Skill_StrikeBase.cpp:429
virtual void OnStrikeMotionWarpDelayCompleted()
Definition GA_Skill_StrikeBase.cpp:399
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ PlayHoldingSection()

bool UGA_Skill_StrikeBase::PlayHoldingSection ( float  DesiredHoldingDuration) const
protected
458{
459 AMainPlayerCharacter* Player = Cast<AMainPlayerCharacter>(GetAvatarActorFromActorInfo());
460
461 if (Player == nullptr || Player->GetMesh() == nullptr)
462 {
463 LOG_ERROR(LogCK, "Holding 섹션을 재생할 플레이어 또는 Mesh가 없습니다.");
464 return false;
465 }
466
467 UAnimInstance* AnimInst = Player->GetMesh()->GetAnimInstance();
468
469 if (AnimInst == nullptr)
470 {
471 LOG_ERROR(LogCK, "%s 가 존재하지 않습니다. ", NAMEOF(UAnimInstance));
472 return false;
473 }
474
475 const float HoldingSectionDuration = GetSkillMontageSectionLength(SkillActionMontage, HoldingSectionName, true);
476
477 if (DesiredHoldingDuration < KINDA_SMALL_NUMBER || HoldingSectionDuration < KINDA_SMALL_NUMBER)
478 {
479 LOG_ERROR(LogCK, "Holding 섹션 지속 시간이 유효하지 않습니다. SectionDuration=%f, DesiredDuration=%f", HoldingSectionDuration, DesiredHoldingDuration);
480 return false;
481 }
482
483 AnimInst->Montage_SetPlayRate(SkillActionMontage, HoldingSectionDuration / DesiredHoldingDuration);
484 AnimInst->Montage_JumpToSection(HoldingSectionName, SkillActionMontage);
485 return true;
486}
#define NAMEOF(Type)
Definition CK_UE.h:30
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ RestorePlayerAndWeaponForStrike()

FORCEINLINE void UGA_Skill_StrikeBase::RestorePlayerAndWeaponForStrike ( )
inlineprotected
96 {
100 }
void SetAvatarMeshHidden(bool bHidden) const
Definition GA_SkillBase.cpp:167
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetCurrentWeaponHidden()

void UGA_Skill_StrikeBase::SetCurrentWeaponHidden ( bool  bHidden) const
protected
490{
491 const AMainPlayerCharacter* Player = Cast<AMainPlayerCharacter>(GetAvatarActorFromActorInfo());
492
493 if (Player == nullptr)
494 {
495 return;
496 }
497
498 USkeletalMeshComponent* WeaponMesh = Player->GetWeaponMeshComponent();
499
500 if (WeaponMesh == nullptr)
501 {
502 return;
503 }
504
505 WeaponMesh->SetVisibility(bHidden == false, false);
506 WeaponMesh->SetHiddenInGame(bHidden, false);
507}
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ SetupStrikeEventListeners()

void UGA_Skill_StrikeBase::SetupStrikeEventListeners ( )
protectedvirtual

UGA_Skill_Strike에서 재구현되었습니다.

432{ }
이 함수를 호출하는 함수들에 대한 그래프입니다.:

◆ StartStrikePhaseChain()

bool UGA_Skill_StrikeBase::StartStrikePhaseChain ( AMainPlayerCharacter Player,
const FGameplayAbilitySpecHandle  Handle,
const FGameplayAbilityActorInfo *  ActorInfo,
const FGameplayAbilityActivationInfo  ActivationInfo 
)
protected
53{
54 if (Player == nullptr)
55 {
56 EndAbility(Handle, ActorInfo, ActivationInfo, true, true);
57 return false;
58 }
59
61 {
62 LOG_ERROR(LogCK, "발동하기 위한 필요한 몽타주 섹션을 찾을 수 없어, 실행할 수 없습니다.");
63 EndAbility(Handle, ActorInfo, ActivationInfo, true, true);
64 return false;
65 }
66
67 const float PreparingCompleteDelay = GetSkillMontageSectionLength(SkillActionMontage, PreparingSectionName, true);
68 const float CurrentHoldingDuration = GetEffectiveHoldingDuration();
69
70 if (PreparingCompleteDelay < KINDA_SMALL_NUMBER || CurrentHoldingDuration < KINDA_SMALL_NUMBER || StrikeMoveDuration < KINDA_SMALL_NUMBER)
71 {
72 LOG_ERROR(LogCK, "페이즈 지속 시간이 유효하지 않아 실행할 수 없습니다.");
73 EndAbility(Handle, ActorInfo, ActivationInfo, true, true);
74 return false;
75 }
76
77 if (CommitAbility(Handle, ActorInfo, ActivationInfo) == false)
78 {
79 EndAbility(Handle, ActorInfo, ActivationInfo, false, true);
80 return false;
81 }
82
83 bStrikeStarted = false;
84
87
88 UAbilityTask_PlayMontageAndWait* PreparingTask = UAbilityTask_PlayMontageAndWait::CreatePlayMontageAndWaitProxy
89 (
90 this,
91 TEXT("PreparingMontage"),
93 1.0f,
95 );
96
97 if (PreparingTask == nullptr)
98 {
99 EndAbility(Handle, ActorInfo, ActivationInfo, true, true);
100 return false;
101 }
102
104 {
106 }
107
108 ActivePreparingTask = PreparingTask;
109 PreparingTask->ReadyForActivation();
110
111 UAbilityTask_WaitDelay* WaitPreparingComplete = UAbilityTask_WaitDelay::WaitDelay(this, PreparingCompleteDelay);
112
113 if (WaitPreparingComplete == nullptr)
114 {
115 EndAbility(Handle, ActorInfo, ActivationInfo, true, true);
116 return false;
117 }
118
119 WaitPreparingComplete->OnFinish.AddDynamic(this, &ThisClass::OnPreparingCompleted);
120 WaitPreparingComplete->ReadyForActivation();
121
122 ApplyEffectsToSelf(Handle, ActorInfo, ActivationInfo);
123
124 // Preparing 이후 이동 중 애니메이션 상태인 Holding 섹션으로 연결한다.
125 if (UAnimInstance* AnimInst = Player->GetMesh() ? Player->GetMesh()->GetAnimInstance() : nullptr)
126 {
127 AnimInst->Montage_SetNextSection(PreparingSectionName, HoldingSectionName, SkillActionMontage);
128 AnimInst->Montage_SetNextSection(HoldingSectionName, HoldingSectionName, SkillActionMontage);
129 }
130 else
131 {
132 LOG_ERROR(LogCK, "%s 가 존재하지 않습니다. ", NAMEOF(UAnimInstance));
133 }
134
135 return true;
136}
void SetupCancelableListener()
Definition GA_Base.cpp:53
void ApplyEffectsToSelf(const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo *ActorInfo, const FGameplayAbilityActivationInfo ActivationInfo)
Definition GA_CombatBase.cpp:265
virtual void SetupStrikeEventListeners()
Definition GA_Skill_StrikeBase.cpp:432
virtual TArray< FName > GetRequiredMontageSections() const
Definition GA_Skill_StrikeBase.cpp:438
이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:
이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ ActiveHoldingTask

TObjectPtr<UAbilityTask_WaitDelay> UGA_Skill_StrikeBase::ActiveHoldingTask
protected

◆ ActiveMoveTask

TObjectPtr<UAT_MoveToLocationCurve> UGA_Skill_StrikeBase::ActiveMoveTask
protected

◆ ActivePreparingTask

TObjectPtr<UAbilityTask_PlayMontageAndWait> UGA_Skill_StrikeBase::ActivePreparingTask
protected

◆ ActiveStrikeMotionWarpDelayTask

TObjectPtr<UAbilityTask_WaitDelay> UGA_Skill_StrikeBase::ActiveStrikeMotionWarpDelayTask
protected

◆ bCurrentWeaponHiddenBySkill

bool UGA_Skill_StrikeBase::bCurrentWeaponHiddenBySkill = false
protected

◆ bIgnorePawnCollisionDuringWarp

bool UGA_Skill_StrikeBase::bIgnorePawnCollisionDuringWarp = true
protected

◆ bStrikeStarted

bool UGA_Skill_StrikeBase::bStrikeStarted = false
protected

◆ CachedStrikeFacingRotation

FRotator UGA_Skill_StrikeBase::CachedStrikeFacingRotation = FRotator::ZeroRotator
protected

◆ ComputeStrikeMoveTarget

virtual bool UGA_Skill_StrikeBase::ComputeStrikeMoveTarget(AMainPlayerCharacter *Player, FVector &OutMoveTarget) PURE_VIRTUAL(UGA_Skill_StrikeBase
protected

◆ HoldingDuration

float UGA_Skill_StrikeBase::HoldingDuration = 0.1f
protected

◆ HoldingSectionName

FName UGA_Skill_StrikeBase::HoldingSectionName
protected

◆ PreparingSectionName

FName UGA_Skill_StrikeBase::PreparingSectionName
protected

◆ SkillActionMontage

TObjectPtr<UAnimMontage> UGA_Skill_StrikeBase::SkillActionMontage
protected

◆ StrikeMotionWarpDelay

float UGA_Skill_StrikeBase::StrikeMotionWarpDelay = 0.0f
protected

◆ StrikeMoveDuration

float UGA_Skill_StrikeBase::StrikeMoveDuration = 0.25f
protected

◆ StrikeMoveProgressCurve

TObjectPtr<UCurveFloat> UGA_Skill_StrikeBase::StrikeMoveProgressCurve
protected

◆ StrikeSectionName

FName UGA_Skill_StrikeBase::StrikeSectionName
protected

◆ TotalMoveCurveIntegral

float UGA_Skill_StrikeBase::TotalMoveCurveIntegral = 0.0f
protected

◆ UpdateStrikeWarpTarget

virtual bool UGA_Skill_StrikeBase::UpdateStrikeWarpTarget() PURE_VIRTUAL(UGA_Skill_StrikeBase
protected

이 클래스에 대한 문서화 페이지는 다음의 파일들로부터 생성되었습니다.: