GASATHON/Project/Source/Gasa/AbilitySystem/GasaAbilitySystemComponent.cpp

38 lines
1.0 KiB
C++
Raw Normal View History

2024-04-25 09:46:26 -07:00
#include "GasaAbilitySystemComponent.h"
#include "Engine/Engine.h"
2024-04-26 15:23:13 -07:00
#include "Engine/GameViewportClient.h"
#include "Game/GasaGameState.h"
#include "Game/GasaPlayerController.h"
#include "GameFramework/HUD.h"
#include "Slate/SceneViewport.h"
#include "UI/GasaHUD.h"
#include "CogDebugDraw.h"
using namespace Gasa;
2024-04-25 09:46:26 -07:00
void UGasaAbilitySystemComp::OnAbilityActorInfoSet()
{
}
void UGasaAbilitySystemComp::EffectApplied(UAbilitySystemComponent* AbilitySystem, FGameplayEffectSpec const& Spec,
FActiveGameplayEffectHandle ActiveEffect)
{
2024-04-26 15:23:13 -07:00
FGameplayTagContainer Tags;
Spec.GetAllAssetTags(Tags);
for (FGameplayTag const& Tag : Tags)
{
// TODO(Ed): Broadcast the tag to the widget controller
FString Msg = FString::Printf(TEXT("GE Tag: %s"), * Tag.ToString());
Log(Msg);
}
2024-04-25 09:46:26 -07:00
}
void UGasaAbilitySystemComp::InitAbilityActorInfo(AActor* InOwnerActor, AActor* InAvatarActor)
{
Super::InitAbilityActorInfo(InOwnerActor, InAvatarActor);
OnGameplayEffectAppliedDelegateToSelf.AddUObject(this, & ThisClass::EffectApplied);
}