Ejemplo n.º 1
0
        public void AddLevel(LevelDefinition level)
        {
            if (level == null)
            {
                throw new ArgumentNullException(nameof(level));
            }

            _levels.Add(level);
        }
Ejemplo n.º 2
0
        private void Level1()
        {
            DuckDefinition duck1 = new DuckDefinition()
            {
                StartX             = 150,
                HorizontalVelocity = 6.0f,
                VerticalVelocity   = -4.0f,
                Flip = false
            };

            DuckDefinition duck2 = new DuckDefinition()
            {
                StartX             = 550,
                HorizontalVelocity = 6.0f,
                VerticalVelocity   = -4.0f,
                Flip = false
            };

            DuckDefinition duck3 = new DuckDefinition()
            {
                StartX             = 1200,
                HorizontalVelocity = -6.0f,
                VerticalVelocity   = -4.0f,
                Flip = true
            };

            DuckDefinition duck4 = new DuckDefinition()
            {
                StartX             = 1600,
                HorizontalVelocity = -6.0f,
                VerticalVelocity   = -4.0f,
                Flip = true
            };

            LevelDefinition level = new LevelDefinition(duck1, duck2, duck3, duck4)
            {
                Duck1StartTimerOffset = 2000,
                Duck2StartTimerOffset = 5000,
                Duck3StartTimerOffset = 8000,
                Duck4StartTimerOffset = 10000
            };


            Levels.Add(level);

            Levels.Shuffle();
        }
Ejemplo n.º 3
0
        private void Level9()
        {
            DuckDefinition duck1 = new DuckDefinition()
            {
                StartX             = 200,
                HorizontalVelocity = 10.0f,
                VerticalVelocity   = -8.5f,
                Flip = false
            };

            DuckDefinition duck2 = new DuckDefinition()
            {
                StartX             = 330,
                HorizontalVelocity = 10.0f,
                VerticalVelocity   = -8.5f,
                Flip = false
            };

            DuckDefinition duck3 = new DuckDefinition()
            {
                StartX             = 1000,
                HorizontalVelocity = 10.0f,
                VerticalVelocity   = -8.5f,
                Flip = true
            };

            DuckDefinition duck4 = new DuckDefinition()
            {
                StartX             = 1700,
                HorizontalVelocity = 10.0f,
                VerticalVelocity   = -8.5f,
                Flip = true
            };

            LevelDefinition level = new LevelDefinition(duck1, duck2, duck3, duck4)
            {
                Duck1StartTimerOffset = 2000,
                Duck2StartTimerOffset = 3000,
                Duck3StartTimerOffset = 4000,
                Duck4StartTimerOffset = 5000
            };


            Levels.Add(level);

            Levels.Shuffle();
        }