You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
581 B
31 lines
581 B
// Copyright Zelle Games
|
|
|
|
|
|
#include "RosterSubsystem.h"
|
|
|
|
const URosterEntry* URosterSubsystem::GetEnemy(int32 Section, int32 ScoreAvailable)
|
|
{
|
|
int32 CB = 0;
|
|
while(CB < 10000)
|
|
{
|
|
CB++;
|
|
const URosterEntry* RosterEntry = EnemyRoster[Section][FMath::RandRange(0, EnemyRoster[Section].Num() -1)];
|
|
if(RosterEntry->DifficultyRating <= ScoreAvailable)
|
|
{
|
|
return RosterEntry;
|
|
}
|
|
}
|
|
|
|
return nullptr;
|
|
}
|
|
|
|
void URosterSubsystem::AddToRoster(TArray<URosterEntry*> RosterEntries)
|
|
{
|
|
EnemyRoster.Add(RosterEntries);
|
|
}
|
|
|
|
void URosterSubsystem::ClearRoster()
|
|
{
|
|
EnemyRoster.Empty();
|
|
}
|