Ed_
ad41867dc5
- Just a old name for a set of changes to make the game framework hardened for multiplayer as well as some ease of use functionality.
24 lines
656 B
C++
24 lines
656 B
C++
#include "GasaEffectActor.h"
|
|
|
|
#include "GasaAbilitySystemComponent_Inlines.h"
|
|
using namespace Gasa;
|
|
|
|
AGasaEffectActor::AGasaEffectActor()
|
|
{
|
|
PrimaryActorTick.bCanEverTick = false;
|
|
|
|
RootComponent = CreateDefaultSubobject<USceneComponent>("Root");
|
|
}
|
|
|
|
void AGasaEffectActor::ApplyEffectToActor(AActor* Actor, TSubclassOf<UGameplayEffect> EffectClass)
|
|
{
|
|
UGasaAbilitySystemComp* AS = GetAbilitySystem(Actor, true);
|
|
|
|
FGameplayEffectContextHandle
|
|
Context = AS->MakeEffectContext();
|
|
Context.AddSourceObject(Actor);
|
|
|
|
FGameplayEffectSpecHandle Spec = AS->MakeOutgoingSpec( EffectClass, 1.0f, Context );
|
|
AS->ApplyGameplayEffectSpecToSelf( * Spec.Data );
|
|
}
|