예제 #1
0
        private void AddEnemy()
        {
            Vector2      position = new Vector2(ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.X + 800 + enemyRockStone.Width, (ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Y + ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Height / 2) + 70);
            ForwardEnemy enemy    = new ForwardEnemy();

            enemy.Initialize(enemyRockStone, position, 6f, 2, 100);
            enemiesRockStone.Add(enemy);
            Vector2      positionCruncher = new Vector2(ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.X + (enemyCruncher.Width / 2) + 700, random.Next(0, ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Height - 200));
            ForwardEnemy enemy2           = new ForwardEnemy();

            enemy2.Initialize(enemyCruncher, positionCruncher, 6f, 2, 100);
            enemiesCrucher.Add(enemy2);
            Vector2     positionSkullStone = new Vector2(random.Next(0, ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.X + 700), ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Y + 500);
            UpwardEnemy enemy3             = new UpwardEnemy();

            enemy3.Initialize(enemySkullStone, positionSkullStone, 6f, 2, 100);
            enemiesSkullStone.Add(enemy3);
            Vector2       positionSpider = new Vector2(random.Next(0, ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.X + 700), ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Y - enemySpider.Height);
            DownwardEnemy enemy4         = new DownwardEnemy();

            enemy4.Initialize(enemySpider, positionSpider, 6f, 2, 100);
            enemiesSpider.Add(enemy4);
            Vector2       positionUFO = new Vector2(ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.X, random.Next(100, ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Height - 200));
            BackwardEnemy enemy5      = new BackwardEnemy();

            enemy5.Initialize(enemyUFO, positionUFO, 6f, 2, 100);
            enemiesUFO.Add(enemy5);
        }
예제 #2
0
        private void AddEnemy()
        {
            Vector2      positionCruncher = new Vector2(ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.X + (enemyCruncher.Width / 2) + 700, random.Next(0, ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Height - 200));
            ForwardEnemy enemy2           = new ForwardEnemy();

            enemy2.Initialize(enemyCruncher, positionCruncher, 4f, 5, 100);
            enemiesCrucher.Add(enemy2);
            Vector2     positionSkullStone = new Vector2(random.Next(0, ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.X + 700), ScreenManager.GraphicsDevice.Viewport.TitleSafeArea.Y + 500);
            UpwardEnemy enemy3             = new UpwardEnemy();

            enemy3.Initialize(enemySkullStone, positionSkullStone, 4f, 5, 150);
            enemiesSkullStone.Add(enemy3);
        }