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

34 lines
987 B
C++
Raw Permalink 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()
{
2024-04-26 18:36:09 -07:00
if ( ! OnGameplayEffectAppliedDelegateToSelf.IsBoundToObject(this))
OnGameplayEffectAppliedDelegateToSelf.AddUObject(this, & ThisClass::EffectApplied);
2024-04-25 09:46:26 -07:00
}
void UGasaAbilitySystemComp::EffectApplied(UAbilitySystemComponent* AbilitySystem, FGameplayEffectSpec const& Spec,
FActiveGameplayEffectHandle ActiveEffect)
{
2024-04-26 18:36:09 -07:00
Log("EFFECT APPLIED?");
2024-04-26 15:23:13 -07:00
FGameplayTagContainer Tags;
Spec.GetAllAssetTags(Tags);
2024-04-26 17:08:08 -07:00
Event_OnEffectAppliedAssetTags.Broadcast(Tags);
2024-04-25 09:46:26 -07:00
}
void UGasaAbilitySystemComp::InitAbilityActorInfo(AActor* InOwnerActor, AActor* InAvatarActor)
{
Super::InitAbilityActorInfo(InOwnerActor, InAvatarActor);
}