Exemple #1
0
 /// <summary>
 /// Allows the game to perform any initialization it needs to before starting to run.
 /// This is where it can query for any required services and load any non-graphic
 /// related content.  Calling base.Initialize will enumerate through any components
 /// and initialize them as well.
 /// </summary>
 protected override void Initialize()
 {
     Player.Initialize();
     Bullet.Initialize();
     Enemy.Initialize();
     //playerBullet = new Bullet(player);
     //bullets.Add(playerBullet);
     base.Initialize();
 }
Exemple #2
0
 private void InitEnemies()
 {
     for (var i = 50; i < ScreenWidth / 1.5; i += 50)
     {
         for (var j = 50; j < ScreenHeight / 2; j += 50)
         {
             var en = new Enemy();
             en.Initialize(enemy, new Vector2(i, j));
             enemies.Add(en);
         }
     }
 }