Пример #1
0
        protected override void Initialize()
        {
            Rand.Init();
            G.currentGame = new Stack<GameType>();
            G.content = new Hashtable();

            this.graphics.IsFullScreen = false;
            this.graphics.PreferredBackBufferWidth = C.Screen.Width;
            this.graphics.PreferredBackBufferHeight = C.Screen.Height;
            this.graphics.ApplyChanges();
            this.Window.Title = "Abimn";
            this.Window.AllowUserResizing = true;

            base.Initialize();

            Cursor.Initialize();
            Cursor.SetCursor("cursor", "default", "clicked", new Pos(-15, -5));

            Music.Volume = 7;
            G.brightness = 50;

            black = new Entity();
            black.LoadContent("black");
            black.Opacity = 0;
            white = new Entity();
            white.LoadContent("white");
            white.Opacity = 0;

            G.currentGame.Push(new Menu());
        }
Пример #2
0
        public override void Initialize()
        {
            Cursor.SetVisibility(true);
            armor = new Entity(new Pos(230, 14));
            armor.LoadContent("inventory", "2", "3", "3");

            weapons = new Entity(new Pos(260, 15));
            weapons.LoadContent("inventory", "10", "11", "11");

            div = new Entity(new Pos(314, 13));
            div.LoadContent("inventory", "6", "7", "7");

            quest = new Entity(new Pos(340, 16));
            quest.LoadContent("inventory", "8", "9", "9");

            cons = new Entity(new Pos(287, 8));
            cons.Initialize();
            cons.LoadContent("inventory", "4", "5", "5");

            _inv = new Entity(new Pos(15, 10));
            _inv.LoadContent("inventory", "1");

            shit = new Entity(new Pos(225, 50), false);
            shit.LoadContent("inventory", "12");

            overshit = new Ennemy(new Pos(225, 50), false);
            overshit.LoadContent("inventory", "13");
        }
Пример #3
0
        public override void Initialize()
        {
            background = new Entity(new Pos(C.Screen.Width/2, C.Screen.Height/2));
            background.LoadContent("options menu", "1", Center.All);

            sonEnabled = new Entity(new Pos(background.Pos.X + background.Rect.Width / 2, background.Pos.Y + background.Rect.Height / 2));
            sonEnabled.LoadContent("options menu", "2", "3", "2", Center.All);

            sonDisabled = new Entity(sonEnabled.Pos, false);
            sonDisabled.LoadContent("options menu", "4", "5", "4");

            volume = new Entity(new Pos(background.Pos.X + background.Rect.Width / 2 - 130, background.Pos.Y + background.Rect.Height / 2 - 100));
            volume.LoadContent("options menu", "6", Center.All);

            luminosite = new Entity(new Pos(background.Pos.X + background.Rect.Width / 2 + 130, background.Pos.Y + background.Rect.Height / 2 - 100));
            luminosite.LoadContent("options menu", "7", Center.All);

            retour = new Entity(new Pos(background.Pos.X + background.Rect.Width / 2, background.Pos.Y + background.Rect.Height / 2 + 100));
            retour.LoadContent("pause menu", "2", "6", "2", Center.All);

            cannaVol = new Entity(new Pos(volume.Pos.X + volume.Rect.Width - 42, volume.Pos.Y + 38));
            cannaLum = new Entity(new Pos(luminosite.Pos.X + luminosite.Rect.Width / 2, luminosite.Pos.Y + 38));
            cannaVol.LoadContent("options menu", "8", "9", "10");
            cannaLum.LoadContent("options menu", "8", "9", "10");
        }
Пример #4
0
        public override void Initialize()
        {
            Music.Stop();
            background = new Entity();
            background.LoadContent("fight", "7");

            exit = new Entity(new Pos(C.Screen.Width / 2, 400));
            exit.LoadContent("fight recap", "2", Center.All);
        }
Пример #5
0
        public override void Initialize()
        {
            fond = new Entity(new Pos(C.Screen.Width / 2, C.Screen.Height / 2));
            fond.LoadContent("fight recap", "1", Center.All);

            exit = new Entity(new Pos(fond.Pos.X + 70, fond.Pos.Y + 370));
            exit.LoadContent("fight recap", "2");

            one = Rand.Int(20, 60);
            two = Rand.Int(75, 100);
        }
Пример #6
0
        public override void Initialize()
        {
            Cursor.SetVisibility(true);

            fond_menu = new Entity();
            fond_menu.Initialize(new Pos(fond_menu.Pos.X+112,fond_menu.Pos.Y+ 94));
            fond_menu.LoadContent("pause menu", "1");

            resume = new Entity(new Pos(fond_menu.Pos.X + 250, fond_menu.Pos.Y + 195));
            resume.LoadContent("pause menu", "2", "6", "2");
            exit = new Entity(new Pos(fond_menu.Pos.X + 250, fond_menu.Pos.Y + 355));
            exit.LoadContent("pause menu", "4", "7", "4");
            option = new Entity(new Pos(fond_menu.Pos.X + 250, fond_menu.Pos.Y + 275));
            option.LoadContent("pause menu", "3", "5", "3");
        }
Пример #7
0
        public override void Initialize()
        {
            G.willFightBoss = false;
            Music.Play("lullaby");
            Hero.LifeMax = 10000;
            Hero.Life = 10000;
            Cursor.SetVisibility(true);

            play = new Entity(new Pos(C.Screen.Width * 0.15, C.Screen.Height * 0.30));
            play.LoadContent("menu principal", "1", "2", "1");

            options = new Entity(new Pos(C.Screen.Width * 0.15, C.Screen.Height * 0.45));
            options.LoadContent("menu principal", "3", "4", "3");

            quit = new Entity(new Pos(C.Screen.Width * 0.15, C.Screen.Height * 0.60));
            quit.LoadContent("menu principal", "5", "6", "5");

            background = new Entity();
            background.LoadContent("menu principal/7");
        }
Пример #8
0
        public override void Initialize()
        {
            /* le edit background devra etre en plein ecran*/
            EditBackground = new Entity(new Pos(C.Screen.Width / 2, C.Screen.Height / 2));
            EditBackground.LoadContent("char edit", "background", Center.All);

            EditBackground2 = new Entity(new Pos(C.Screen.Width / 2, C.Screen.Height / 2),false);
            EditBackground2.LoadContent("char edit", "21", Center.All);

            EditBackground3 = new Entity(new Pos(C.Screen.Width / 2, C.Screen.Height / 2),false);
            EditBackground3.LoadContent("char edit", "22", Center.All);

            quit = new Entity(new Pos(C.Screen.Width - 245, C.Screen.Height - 95));
            quit.LoadContent("char edit", "9", "10", "9");

            next = new Entity(new Pos(C.Screen.Width - 455, C.Screen.Height - 95));
            next.LoadContent("char edit", "7", "8", "7");

            next2 = new Entity(new Pos(C.Screen.Width-455, C.Screen.Height-95 ),false);
            next2.LoadContent("char edit", "7", "8", "7");

            back = new Entity(new Pos(C.Screen.Width - 245, C.Screen.Height - 95),false);
            back.LoadContent("char edit", "11", "12", "11");

            back2 = new Entity(new Pos(C.Screen.Width - 245, C.Screen.Height - 95), false);
            back2.LoadContent("char edit", "11", "12", "11");

            play = new Entity(new Pos(C.Screen.Width - 455, C.Screen.Height - 95), false);
            play.LoadContent("char edit", "19", "20", "19");

            head1 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 400),false);
            head1.LoadContent("char edit", "23");

            head2 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 400),false);
            head2.LoadContent("char edit", "24");

            head3 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 400), false);
            head3.LoadContent("char edit", "25");

            head4 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 400), false);
            head4.LoadContent("char edit", "26");

            head5 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 400), false);
            head5.LoadContent("char edit", "27");

            head6 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 400), false);
            head6.LoadContent("char edit", "28");

            body1 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 390), false);
            body1.LoadContent("char edit", "29");

            body2 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 390), false);
            body2.LoadContent("char edit", "30");

            body3 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 390), false);
            body3.LoadContent("char edit", "31");

            body4 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 390), false);
            body4.LoadContent("char edit", "32");

            body5 = new Entity(new Pos(C.Screen.Width - 750, C.Screen.Height - 390), false);
            body5.LoadContent("char edit", "33");

            arrowL1 = new Entity(new Pos(C.Screen.Width - 550, C.Screen.Height - 350), true);
            arrowL1.LoadContent("char edit", "6");

            arrowR1 = new Entity(new Pos(C.Screen.Width - 590, C.Screen.Height - 350), true);
            arrowR1.LoadContent("char edit", "5");

            arrowL =new Entity(new Pos(C.Screen.Width-550, C.Screen.Height -400),true);
            arrowL.LoadContent("char edit", "6");

            arrowR = new Entity(new Pos(C.Screen.Width - 590, C.Screen.Height - 400),true);
            arrowR.LoadContent("char edit", "5");

            role1 = new Entity(new Pos(C.Screen.Width - 550, C.Screen.Height - 400),false);
            role1.LoadContent("char edit", "13", "14", "14");

            role2 = new Entity(new Pos(C.Screen.Width - 550, C.Screen.Height - 300),false);
            role2.LoadContent("char edit", "15", "16", "16");
        }
Пример #9
0
 public virtual bool IntersectsWith(Entity entity)
 {
     return Rect.Intersects(entity.Rect);
 }