DungeonCrawler-UE-C/Source/DungeonCrawlerUE/Variant_Combat/Animation/AnimNotify_CheckChargedAttack.cpp
sandr fc08cd0c0b Initial commit – UE5 DungeonCrawler project mit Planung v4.2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 22:17:14 +02:00

21 lines
691 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "AnimNotify_CheckChargedAttack.h"
#include "CombatAttacker.h"
#include "Components/SkeletalMeshComponent.h"
void UAnimNotify_CheckChargedAttack::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
{
// cast the owner to the attacker interface
if (ICombatAttacker* AttackerInterface = Cast<ICombatAttacker>(MeshComp->GetOwner()))
{
// tell the actor to check for a charged attack loop
AttackerInterface->CheckChargedAttack();
}
}
FString UAnimNotify_CheckChargedAttack::GetNotifyName_Implementation() const
{
return FString("Check Charged Attack");
}