本文整理汇总了C++中FAnimMontageInstance::GetCurrentSection方法的典型用法代码示例。如果您正苦于以下问题:C++ FAnimMontageInstance::GetCurrentSection方法的具体用法?C++ FAnimMontageInstance::GetCurrentSection怎么用?C++ FAnimMontageInstance::GetCurrentSection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FAnimMontageInstance
的用法示例。
在下文中一共展示了FAnimMontageInstance::GetCurrentSection方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Montage_GetCurrentSection
FName UAnimInstance::Montage_GetCurrentSection()
{
FAnimMontageInstance * CurMontageInstance = GetActiveMontageInstance();
if ( CurMontageInstance )
{
return CurMontageInstance->GetCurrentSection();
}
return NAME_None;
}
示例2: DisplayDebug
//.........这里部分代码省略.........
CharacterMovement->DisplayDebug(Canvas, DebugDisplay, YL, YPos);
}
const bool Crouched = CharacterMovement && CharacterMovement->IsCrouching();
FString T = FString::Printf(TEXT("Crouched %i"), Crouched);
Canvas->DrawText(RenderFont, T, Indent, YPos );
YPos += YL;
}
if(Mesh && Mesh->GetAnimInstance())
{
static FName NAME_Animation = FName(TEXT("Animation"));
if( DebugDisplay.Contains(NAME_Animation) )
{
YPos += YL;
Canvas->DrawText(RenderFont, TEXT("Animation"), Indent, YPos );
YPos += YL;
Indenter AnimIndent(Indent);
//Display Sync Groups
UAnimInstance* AnimInstance = Mesh->GetAnimInstance();
FString Heading = FString::Printf(TEXT("SyncGroups: %i"), AnimInstance->SyncGroups.Num());
Canvas->DrawText(RenderFont, Heading, Indent, YPos );
YPos += YL;
for (int32 GroupIndex = 0; GroupIndex < AnimInstance->SyncGroups.Num(); ++GroupIndex)
{
Indenter GroupIndent(Indent);
FAnimGroupInstance& SyncGroup = AnimInstance->SyncGroups[GroupIndex];
FString GroupLabel = FString::Printf(TEXT("Group %i - Players %i"), GroupIndex, SyncGroup.ActivePlayers.Num());
Canvas->DrawText(RenderFont, GroupLabel, Indent, YPos );
YPos += YL;
if (SyncGroup.ActivePlayers.Num() > 0)
{
const int32 GroupLeaderIndex = FMath::Max(SyncGroup.GroupLeaderIndex, 0);
for(int32 PlayerIndex = 0; PlayerIndex < SyncGroup.ActivePlayers.Num(); ++PlayerIndex)
{
Indenter PlayerIndent(Indent);
FAnimTickRecord& Player = SyncGroup.ActivePlayers[PlayerIndex];
Canvas->SetLinearDrawColor( (PlayerIndex == GroupLeaderIndex) ? FLinearColor::Green : FLinearColor::Yellow);
FString PlayerEntry = FString::Printf(TEXT("%i) %s W:%.3f"), PlayerIndex, *Player.SourceAsset->GetName(), Player.EffectiveBlendWeight);
Canvas->DrawText(RenderFont, PlayerEntry, Indent, YPos );
YPos += YL;
}
}
}
Heading = FString::Printf(TEXT("Ungrouped: %i"), AnimInstance->UngroupedActivePlayers.Num());
Canvas->DrawText(RenderFont, Heading, Indent, YPos );
YPos += YL;
Canvas->SetLinearDrawColor( FLinearColor::Yellow );
for (int32 PlayerIndex = 0; PlayerIndex < AnimInstance->UngroupedActivePlayers.Num(); ++PlayerIndex)
{
Indenter PlayerIndent(Indent);
const FAnimTickRecord& Player = AnimInstance->UngroupedActivePlayers[PlayerIndex];
FString PlayerEntry = FString::Printf(TEXT("%i) %s W:%.3f"), PlayerIndex, *Player.SourceAsset->GetName(), Player.EffectiveBlendWeight);
Canvas->DrawText(RenderFont, PlayerEntry, Indent, YPos );
YPos += YL;
}
Heading = FString::Printf(TEXT("Montages: %i"), AnimInstance->MontageInstances.Num());
Canvas->DrawText(RenderFont, Heading, Indent, YPos );
YPos += YL;
for (int32 MontageIndex = 0; MontageIndex < AnimInstance->MontageInstances.Num(); ++MontageIndex)
{
Indenter PlayerIndent(Indent);
Canvas->SetLinearDrawColor( (MontageIndex == (AnimInstance->MontageInstances.Num()-1)) ? FLinearColor::Green : FLinearColor::Yellow );
FAnimMontageInstance* MontageInstance = AnimInstance->MontageInstances[MontageIndex];
FString MontageEntry = FString::Printf(TEXT("%i) %s Sec: %s W:%.3f DW:%.3f"), MontageIndex, *MontageInstance->Montage->GetName(), *MontageInstance->GetCurrentSection().ToString(), MontageInstance->Weight, MontageInstance->DesiredWeight);
Canvas->DrawText(RenderFont, MontageEntry, Indent, YPos );
YPos += YL;
}
}
static FName NAME_SimpleBones = FName(TEXT("SimpleBones"));
static FName NAME_Bones = FName(TEXT("Bones"));
if( DebugDisplay.Contains(NAME_SimpleBones) )
{
Mesh->DebugDrawBones(Canvas,true);
}
else if( DebugDisplay.Contains(NAME_Bones) )
{
Mesh->DebugDrawBones(Canvas,false);
}
}
}