Пример #1
0
        public ITrainerPool[] ExtractPools(Pokemon[] pokemon, Move[] moves)
        {
            var trainerPool = new ITrainerPool[XDTrainerPool.MainTeams.Length + 1];

            trainerPool[0] = new XDShadowTrainerPool(ISO, pokemon, moves);

            for (int i = 1; i <= XDTrainerPool.MainTeams.Length; i++)
            {
                var pool = XDTrainerPool.MainTeams[i - 1];
                trainerPool[i] = new XDTrainerPool(pool, ISO, pokemon, moves);
                trainerPool[i].SetShadowPokemon(trainerPool[0] as XDShadowTrainerPool);
                trainerPool[i].LoadTrainers();
            }
            return(trainerPool);
        }
Пример #2
0
 public void SetShadowPokemon(ITrainerPool pool)
 {
     DarkPokemon = pool as XDShadowTrainerPool ?? throw new Exception("Invalid shadow pool!");
 }