Esempio n. 1
0
        private void AddEnemyHelo(
                ref Random rnd,
                ref Texture2D EnemyTexture,
                ref Texture2D EnemyTexture2,
                ref List<EnemyHelo> ChopperList
            )
        {
            //LeftOrRigth = lastHeloDirection;
            int LeftOrRigth = rnd.Next(2);

            if (LeftOrRigth == 0)
            {

                int yPos = 10;
                Animation enemyAnim = new Animation();
                enemyAnim.Initialize(EnemyTexture, new Vector2(0, yPos), EnemyTexture.Width / 2, EnemyTexture.Height, 2, 80, Color.White, true);

                EnemyHelo Helo = new EnemyHelo();
                Helo.Initialize(enemyAnim, yPos, false);
                ChopperList.Add(Helo);
            }
            else
            {
                int yPos = 50;
                Animation enemyAnim = new Animation();
                enemyAnim.Initialize(EnemyTexture2, new Vector2(0, yPos), EnemyTexture.Width / 2, EnemyTexture.Height, 2, 80, Color.White, true);

                EnemyHelo Helo = new EnemyHelo();
                Helo.Initialize(enemyAnim, yPos, true);
                ChopperList.Add(Helo);
            }
        }
Esempio n. 2
0
 private void AddEnemyParatrooper(
         Vector2 Position,
         ref Texture2D ParatrooperTexture,
         ref Texture2D ParachuteTexture,
         ref List<EnemyParatrooper> ParatrooperList
     )
 {
     EnemyParatrooper para = new EnemyParatrooper();
         Animation TrooperAnim = new Animation();
         TrooperAnim.Initialize(ParatrooperTexture, Position, ParatrooperTexture.Width / 2, ParatrooperTexture.Height, 2, 80, Color.White, true);
         para.Initialize(TrooperAnim, ParachuteTexture, Position);
         ParatrooperList.Add(para);
 }