本文整理汇总了C++中FGameplayEffectContextHandle::IsLocallyControlled方法的典型用法代码示例。如果您正苦于以下问题:C++ FGameplayEffectContextHandle::IsLocallyControlled方法的具体用法?C++ FGameplayEffectContextHandle::IsLocallyControlled怎么用?C++ FGameplayEffectContextHandle::IsLocallyControlled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FGameplayEffectContextHandle
的用法示例。
在下文中一共展示了FGameplayEffectContextHandle::IsLocallyControlled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GameplayCueActivated
void FGameplayCueHandler::GameplayCueActivated(const FGameplayTagContainer& GameplayCueTags, float NormalizedMagnitude, const FGameplayEffectContextHandle& EffectContext)
{
check(Owner);
bool InstigatorLocal = EffectContext.IsLocallyControlled();
bool TargetLocal = OwnerIsLocallyControlled();
for (auto TagIt = GameplayCueTags.CreateConstIterator(); TagIt; ++TagIt)
{
if (FGameplayCueViewInfo* View = GetBestMatchingView(EGameplayCueEvent::OnActive, *TagIt, InstigatorLocal, TargetLocal))
{
View->SpawnViewEffects(Owner, NULL, EffectContext);
}
FName MatchedTag;
UFunction *Func = UAbilitySystemGlobals::Get().GetGameplayCueFunction(*TagIt, Owner->GetClass(), MatchedTag);
if (Func)
{
FGameplayCueParameters Params;
Params.NormalizedMagnitude = NormalizedMagnitude;
Params.EffectContext = EffectContext;
IGameplayCueInterface::DispatchBlueprintCustomHandler(Owner, Func, EGameplayCueEvent::OnActive, Params);
}
}
}
示例2: GameplayCueExecuted
void FGameplayCueHandler::GameplayCueExecuted(const FGameplayTagContainer& GameplayCueTags, float NormalizedMagnitude, const FGameplayEffectContextHandle& EffectContext)
{
check(Owner);
bool InstigatorLocal = EffectContext.IsLocallyControlled();
bool TargetLocal = OwnerIsLocallyControlled();
for (auto TagIt = GameplayCueTags.CreateConstIterator(); TagIt; ++TagIt)
{
if (FGameplayCueViewInfo* View = GetBestMatchingView(EGameplayCueEvent::Executed, *TagIt, InstigatorLocal, TargetLocal))
{
View->SpawnViewEffects(Owner, NULL, EffectContext);
}
}
}
示例3: GameplayCueAdded
void FGameplayCueHandler::GameplayCueAdded(const FGameplayTagContainer& GameplayCueTags, float NormalizedMagnitude, const FGameplayEffectContextHandle& EffectContext)
{
check(Owner);
bool InstigatorLocal = EffectContext.IsLocallyControlled();
bool TargetLocal = OwnerIsLocallyControlled();
for (auto TagIt = GameplayCueTags.CreateConstIterator(); TagIt; ++TagIt)
{
TArray<TSharedPtr<FGameplayCueViewEffects> > &Effects = SpawnedViewEffects.FindOrAdd(*TagIt);
// Clear old effects if they existed? This will vary case to case. Removing old effects is the easiest approach
ClearEffects(Effects);
check(Effects.Num() == 0);
if (FGameplayCueViewInfo * View = GetBestMatchingView(EGameplayCueEvent::WhileActive, *TagIt, InstigatorLocal, TargetLocal))
{
TSharedPtr<FGameplayCueViewEffects> SpawnedEffects = View->SpawnViewEffects(Owner, &SpawnedObjects, EffectContext);
Effects.Add(SpawnedEffects);
}
}
}
示例4: EffectContextIsInstigatorLocallyControlled
bool UAbilitySystemBlueprintLibrary::EffectContextIsInstigatorLocallyControlled(FGameplayEffectContextHandle EffectContext)
{
return EffectContext.IsLocallyControlled();
}