本文整理汇总了C++中FRichCurve::Eval方法的典型用法代码示例。如果您正苦于以下问题:C++ FRichCurve::Eval方法的具体用法?C++ FRichCurve::Eval怎么用?C++ FRichCurve::Eval使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FRichCurve
的用法示例。
在下文中一共展示了FRichCurve::Eval方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Explode
void AProjectile::Explode()
{
BP_Explode();
const FVector Loc = GetActorLocation();
for (TActorIterator<AActor> aItr(GetWorld()); aItr; ++aItr)
{
const float distance = GetDistanceTo(*aItr);
if (distance<AffectArea && aItr && aItr->GetRootComponent() && aItr->GetRootComponent()->Mobility == EComponentMobility::Movable)
{
FVector dir = aItr->GetActorLocation() - Loc;
dir.Normalize();
FRichCurve* RadialDamageCurveData = RadialDamageCurve.GetRichCurve();
FRichCurve* RadialImpulseCurveData = RadialImpulseCurve.GetRichCurve();
ABaseCharacter* theChar = Cast<ABaseCharacter>(*aItr);
//If Player apply damage
if (theChar && RadialDamageCurveData)
{
//printr("Apply Damage");
UGameplayStatics::ApplyDamage(theChar, RadialDamageCurveData->Eval(distance), NULL, this, ExplosionDamageType);
}
if (RadialImpulseCurveData && aItr->GetRootComponent()->IsSimulatingPhysics() && Cast<UPrimitiveComponent>(aItr->GetRootComponent()))
{
Cast<UPrimitiveComponent>(aItr->GetRootComponent())->AddImpulse(dir*RadialImpulseCurveData->Eval(distance));
}
}
}
Destroy();
}
示例2: Eval
float FCurveTableRowHandle::Eval(float XValue) const
{
SCOPE_CYCLE_COUNTER(STAT_CurveTableRowHandleEval);
FRichCurve* Curve = GetCurve();
if(Curve != NULL)
{
return Curve->Eval(XValue);
}
return 0;
}