Exemplo n.º 1
0
        /// <summary>
        /// Build the level 1 of the game
        /// </summary>
        private void Level1()
        {
            //Instanciation du player et de son sprite
            player = new Players(6);

            CreateBaseInterface();
            //Instanciation des objets du niveau
            //Instanciation des clés
            blueKey = new LevelsKeys(1, false);
            //Instanciation des portes
            endDoor = new Doors(1, false, DoorsOutputs.Level2);
            //Instanciation des piques
            spike = new Spikes();
            //Déclaration et instanciation des sprites du niveau
            //Création des plateforms
            PictureBox pbPlateformBase = new PictureBox();
            PictureBox pbBloc1         = new PictureBox();
            PictureBox pbBloc2         = new PictureBox();

            //Création des portes

            //Initialisation des sprites du niveau
            //Initialisation des sprites de plateformes
            CreatePB(pbPlateformBase, "pbPlateformBase", 3072, 70, 10, 900, Application.StartupPath + @"\res\base.png", "platform");
            CreatePB(pbBloc1, "pbBloc1", 70, 70, 1000, 830, Application.StartupPath + @"\res\stone.broken.1.png", "platform");
            CreatePB(pbBloc2, "pbBloc2", 140, 140, 1140, 760, Application.StartupPath + @"\res\stone.broken.4.png", "platform");
            //Initialisation des sprites de clés
            CreatePB(blueKey, "blueKey", 70, 65, 1300, 830, Application.StartupPath + @"\res\key.blue.png", "key");
            //Initialisation des sprites de porte
        }
Exemplo n.º 2
0
        /// <summary>
        /// Build the level 3 of the game
        /// </summary>
        private void Level3()
        {
            //Instanciation du player
            player = new Players(6);

            CreateBaseInterface();

            //Instanciation des objets du niveau
            //Instanciation des clés
            blueKey = new LevelsKeys(1, false);
            //Instanciation des piques
            spike = new Spikes();
            Spikes spike2 = new Spikes();
            Spikes spike3 = new Spikes();
            Spikes spike4 = new Spikes();
            Spikes spike5 = new Spikes();
            //Instanciation des slims
            Slims slim1 = new Slims(100);
            Slims slim2 = new Slims(50);
            Slims slim3 = new Slims(30);
            //Déclaration et instanciation des sprites du niveau
            //Création des plateforms
            PictureBox pbPlateformBase = new PictureBox();
            PictureBox pbBloc1         = new PictureBox();
            PictureBox pbBloc2         = new PictureBox();
            PictureBox pbBloc3         = new PictureBox();

            //Initialisation des sprites de plateformes
            CreatePB(pbPlateformBase, "pbPlateformBase", 3072, 70, 10, 900, Application.StartupPath + @"\res\base.png", "platform");
            CreatePB(pbBloc1, "pbBloc1", 70, 70, 1300, 830, Application.StartupPath + @"\res\stone.broken.1.png", "platform");
            CreatePB(pbBloc2, "pbBloc2", 70, 70, 1450, 520, Application.StartupPath + @"\res\stone.broken.1.png", "platform");
            CreatePB(pbBloc3, "pbBloc1", 70, 70, 1230, 650, Application.StartupPath + @"\res\stone.broken.1.png", "platform");
            //Initialisation des sprites de slims
            CreatePB(slim1, "slim1", 40, 40, 1250, 865, Application.StartupPath + @"\res\slime.right.1.png", "slims");
            CreatePB(slim2, "slim2", 40, 40, 1050, 865, Application.StartupPath + @"\res\slime.right.1.png", "slims");
            CreatePB(slim3, "slim3", 40, 40, 2200, 865, Application.StartupPath + @"\res\slime.right.1.png", "slims");
            slims.Add(slim1);
            slims.Add(slim2);
            slims.Add(slim3);
            //Initialisation des sprites de clés
            CreatePB(blueKey, "blueKey", 70, 65, 1450, 400, Application.StartupPath + @"\res\key.blue.png", "key");
            //Initialisation des sprites de piques
            CreatePB(spike, "spike1", 70, 75, 1650, 865, Application.StartupPath + @"\res\spikes.png", "spikes");
            CreatePB(spike2, "spike2", 70, 75, 1550, 865, Application.StartupPath + @"\res\spikes.png", "spikes");
            CreatePB(spike3, "spike3", 70, 75, 650, 865, Application.StartupPath + @"\res\spikes.png", "spikes");
            CreatePB(spike4, "spike4", 70, 75, 1850, 865, Application.StartupPath + @"\res\spikes.png", "spikes");
            CreatePB(spike5, "spike5", 70, 75, 1920, 865, Application.StartupPath + @"\res\spikes.png", "spikes");
        }
Exemplo n.º 3
0
        /// <summary>
        /// Build the level 2 of the game
        /// </summary>
        private void Level2()
        {
            //Instanciation du player
            player = new Players(6);

            CreateBaseInterface();

            //Instanciation des objets du niveau
            //Instanciation des clés
            blueKey   = new LevelsKeys(1, false);
            redKey    = new LevelsKeys(1, false);
            greenKey  = new LevelsKeys(1, false);
            yellowKey = new LevelsKeys(1, false);
            //Instanciation des portes
            endDoor = new Doors(1, false, DoorsOutputs.Level3);
            //Instanciation des piques
            spike = new Spikes();
            //Instanciation des slims
            Slims slim1 = new Slims(100);
            //Déclaration et instanciation des sprites du niveau
            //Création des plateforms
            PictureBox pbPlateformBase = new PictureBox();
            PictureBox pbBloc1         = new PictureBox();

            //Création des portes
            //Initialisation des sprites du niveau
            //Initialisation des sprites de plateformes
            CreatePB(pbPlateformBase, "pbPlateformBase", 3072, 70, 10, 900, Application.StartupPath + @"\res\base.png", "platform");
            CreatePB(pbBloc1, "pbBloc1", 70, 70, 1000, 830, Application.StartupPath + @"\res\stone.broken.1.png", "platform");
            //Initialisation des sprites de slims
            CreatePB(slim1, "slim1", 40, 40, 2050, 865, Application.StartupPath + @"\res\slime.right.1.png", "slims");
            slims.Add(slim1);
            //Initialisation des sprites de clés
            CreatePB(blueKey, "blueKey", 70, 65, 1300, 830, Application.StartupPath + @"\res\key.blue.png", "key");
            CreatePB(redKey, "redKey", 70, 65, 1380, 830, Application.StartupPath + @"\res\key.red.png", "key");
            CreatePB(greenKey, "greenKey", 70, 65, 1460, 830, Application.StartupPath + @"\res\key.green.png", "key");
            CreatePB(yellowKey, "yellowKey", 70, 65, 1540, 830, Application.StartupPath + @"\res\key.yellow.png", "key");
            //Initialisation des sprites de porte
            //Initialisation des sprites de piques
            CreatePB(spike, "spike1", 70, 75, 1650, 865, Application.StartupPath + @"\res\spikes.png", "spikes");
        }