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.
21 lines
374 B
21 lines
374 B
9 months ago
|
// Copyright Zelle Games
|
||
|
|
||
|
|
||
|
#include "RosterSubsystem.h"
|
||
|
|
||
|
const URosterEntry* URosterSubsystem::GetEnemy(int32 ScoreAvailable)
|
||
|
{
|
||
|
int32 CB = 0;
|
||
|
while(CB < 10000)
|
||
|
{
|
||
|
CB++;
|
||
|
const URosterEntry* RosterEntry = EnemyRoster[FMath::RandRange(0, EnemyRoster.Num() -1)];
|
||
|
if(RosterEntry->DifficultyRating <= ScoreAvailable)
|
||
|
{
|
||
|
return RosterEntry;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return nullptr;
|
||
|
}
|