コード例 #1
0
 private void SetDefaultValues()
 {
     Player            = new Player(new Vector2(300, 600), new Vector2(19, 19), "2D\\Player");
     ScoreSprite       = new ScoreSprite(Player, PopulationRepository.MaxPopGenerationNumber);
     Population        = PopulationMapper.MapEntirePopDbToPop(PopulationRepository.GetPopulationFromDb());
     Enemies           = EnemyRepository.GetEnemiesFromDb();
     CurrentPopulation = Population.First(x => x.AfterGame == false);
 }
コード例 #2
0
        private void SetDefaultTest()
        {
            Player      = new Player(new Vector2(300, 600), new Vector2(19, 19), "2D\\Player");
            ScoreSprite = new ScoreSprite(Player, 0);
            Population  = PopulationMapper.MapEntirePopDbToPop(PopulationRepository.GetPopulationFromDb());
            Enemies     = EnemyRepository.GetEnemiesFromDb();
            var best = PopulationRepository.GetBestPopulation();

            CurrentPopulation = PopulationMapper.MapPopDbToPop(best, best.IdObject);
        }