Added Sorting SplitRanking By Rank Helper

This commit is contained in:
2024-07-19 12:33:08 +02:00
parent fe6035ab1f
commit f19503a3b7
2 changed files with 12 additions and 1 deletions

View File

@ -83,3 +83,12 @@ FString UDTFluxModelHelper::GetCurrentStageName(UDTFluxDataStorage* DataStorage)
}
return Name;
}
void UDTFluxModelHelper::SortByRank(TArray<FDTFluxSplitRanking>& SplitRankingArray)
{
SplitRankingArray.Sort([](const FDTFluxSplitRanking A, const FDTFluxSplitRanking B )
{
return A.Rank < B.Rank;
});
}

View File

@ -130,5 +130,7 @@ public:
UFUNCTION(BlueprintCallable, Category="DTFlux|Model|Helpers")
static FString GetCurrentStageName(UDTFluxDataStorage* DataStorage);
UFUNCTION(BlueprintCallable, Category="DTFlux|Model|Helpers")
static void SortByRank(TArray<FDTFluxSplitRanking>& SplitRankingArray);
};