예제 #1
0
        public cNiveau2(IServiceProvider serviceProvider, GraphicsDeviceManager graphics)
            : base(serviceProvider, graphics)
        {
            Joueur           = new ZLPlayer(new Vector2(970, 670), false, true);
            Joueur2          = new Ninja(new Vector2(970, 670));
            Joueur3          = new Kirby(new Vector2(100, 200));
            camera           = new Camera(graphics.GraphicsDevice.Viewport);
            rApparition      = new Random();
            camera           = new Camera(graphics.GraphicsDevice.Viewport);
            Hud              = new HUD();
            EV               = new EnnemiVague();
            Hud.balle        = GestionExterne.nbBalleGun;
            Hud.argent       = GestionExterne.argent;
            Hud.fleche       = GestionExterne.nbFleche;
            Hud.balleShotgun = GestionExterne.nbBalleShotgun;
            Hud.laser        = GestionExterne.nbLaser;

            MP = new MusicPlayer(new Song[] { Ressources.PSong, Ressources.FSong
                                              , Ressources.BPSong, Ressources.MGSong, Ressources.RESong });

            MP.Load(GestionExterne.numSong);

            Obj  = new List <ObjCollisionable>();
            Obj2 = new List <OBJCollisionable>();


            Zombies       = new List <Zombie>();
            ZombiesCR     = new List <ZombieCR>();
            ZombiesF      = new List <ZombieF>();
            BossZombies   = new List <BossZombie>();
            BossZombiesCR = new List <BossZombieCR>();
            BossZombiesF  = new List <BossZombieF>();

            ZombiesAppartition = new Vector2[14] {
                new Vector2(200, 215), new Vector2(715, -50), new Vector2(1060, -50), new Vector2(1670, 230),
                new Vector2(1700, 500), new Vector2(1700, 900), new Vector2(1700, 1100), new Vector2(1300, 1100),
                new Vector2(800, 1100), new Vector2(200, 1100), new Vector2(1500, 1300), new Vector2(1200, 1300),
                new Vector2(600, 1300), new Vector2(400, 1300)
            };
            #region Obj Collisionable
            Obj.Add(new ObjCollisionable(new Rectangle(250, 785, 25, 5)));
            Obj.Add(new ObjCollisionable(new Rectangle(75, 55, 210, 10)));
            Obj.Add(new ObjCollisionable(new Rectangle(75, 5, 220, 50)));
            Obj.Add(new ObjCollisionable(new Rectangle(340, 395, 13, 10)));
            Obj.Add(new ObjCollisionable(new Rectangle(1430, 165, 10, 5)));
            Obj.Add(new ObjCollisionable(new Rectangle(1520, 880, 10, 5)));
            Obj.Add(new ObjCollisionable(new Rectangle(460, 570, 20, 100)));
            Obj.Add(new ObjCollisionable(new Rectangle(480, 590, 10, 80)));
            Obj.Add(new ObjCollisionable(new Rectangle(1470, 570, 20, 100)));
            Obj.Add(new ObjCollisionable(new Rectangle(1450, 590, 10, 80)));
            #endregion

            foreach (ObjCollisionable O in Obj)
            {
                Obj2.Add(new OBJCollisionable(O.recObj));
            }
        }
예제 #2
0
        public cNiveau1(IServiceProvider serviceProvider, GraphicsDeviceManager graphics)
            : base(serviceProvider, graphics)
        {
            Joueur      = new ZLPlayer(new Vector2(100, 200), false, true);
            Joueur2     = new Ninja(new Vector2(100, 200));
            Joueur3     = new Kirby(new Vector2(100, 200));
            rApparition = new Random();
            camera      = new Camera(graphics.GraphicsDevice.Viewport);
            Hud         = new HUD();
            EV          = new EnnemiVague();

            Hud.balle        = GestionExterne.nbBalleGun;
            Hud.argent       = GestionExterne.argent;
            Hud.fleche       = GestionExterne.nbFleche;
            Hud.balleShotgun = GestionExterne.nbBalleShotgun;
            Hud.laser        = GestionExterne.nbLaser;

            MP = new MusicPlayer(new Song[] { Ressources.PSong, Ressources.FSong
                                              , Ressources.BPSong, Ressources.MGSong, Ressources.RESong });

            MP.Load(GestionExterne.numSong);

            Obj  = new List <ObjCollisionable>();
            Obj2 = new List <OBJCollisionable>();

            Zombies            = new List <Zombie>();
            ZombiesCR          = new List <ZombieCR>();
            ZombiesF           = new List <ZombieF>();
            BossZombies        = new List <BossZombie>();
            BossZombiesCR      = new List <BossZombieCR>();
            BossZombiesF       = new List <BossZombieF>();
            ZombiesAppartition = new Vector2[10] {
                new Vector2(100, 50), new Vector2(100, 500), new Vector2(800, 50), new Vector2(800, 500),
                new Vector2(400, 500), new Vector2(400, 50), new Vector2(1200, 50), new Vector2(1200, 500),
                new Vector2(1800, 50), new Vector2(1800, 500)
            };
            #region Objects Collisionables
            Obj.Add(new ObjCollisionable(new Rectangle(190, 20, 20, 20)));
            Obj.Add(new ObjCollisionable(new Rectangle(360, 245, 13, 10)));
            Obj.Add(new ObjCollisionable(new Rectangle(360, 330, 1, 20)));
            Obj.Add(new ObjCollisionable(new Rectangle(500, 0, 1, 130)));
            Obj.Add(new ObjCollisionable(new Rectangle(500, 300, 1, 10)));
            Obj.Add(new ObjCollisionable(new Rectangle(500, 430, 1, 10)));
            Obj.Add(new ObjCollisionable(new Rectangle(610, 210, 5, 10)));
            Obj.Add(new ObjCollisionable(new Rectangle(1090, 70, 1, 1)));
            Obj.Add(new ObjCollisionable(new Rectangle(1090, 330, 1, 1)));
            Obj.Add(new ObjCollisionable(new Rectangle(1330, 235, 70, 10)));
            Obj.Add(new ObjCollisionable(new Rectangle(1560, 210, 1, 1)));
            Obj.Add(new ObjCollisionable(new Rectangle(1540, 250, 1, 20)));
            #endregion

            foreach (ObjCollisionable O in Obj)
            {
                Obj2.Add(new OBJCollisionable(O.recObj));
            }
        }