// 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 RosterEntries) { EnemyRoster.Add(RosterEntries); } void URosterSubsystem::ClearRoster() { EnemyRoster.Empty(); }