Exemplo n.º 1
0
        private void ChopperGenerator()
        {
            if (TotalRoundTime >= _spawnChopperSecond)
            {
                Random random = new Random();
                _spawnChopperSecond = random.Next(_spawnChopperSecond + 3, _spawnChopperSecond + 7);
                Chopper chopper = new Chopper() {
                    Texture = _chopperTexture,
                    Color = Color.White,
                    Position = new Vector2(ScrollingPosition-70, 60),
                    Speed = 6f,
                    TextureName = "chopper",
                    DropSecond = random.Next(0, 5),
                    Health = 200
                };
                chopper.Missiles = new List<Missile>(){
                    CreateMissile(new Missile(), new Point(-40,0), 300),
                    CreateMissile(new Missile(), new Point(-40,0), 300)
                    };

                SpriteList.Add(chopper);
            }
        }
Exemplo n.º 2
0
        public void setup()
        {
            missile = new Missile()
            {
                Damage = 300,
                Active = true,
                Speed = 3f,
                Exploded = false,
                Position = new Vector2(0, 0)
            };
            chopper = new Chopper()
            {
                Health = 300,
                Speed = 2f,
                Position = new Vector2 (20,20)
            };

            level = new Level();
        }