Esempio n. 1
0
        protected override void LoadObjects()
        {
            // Skybox
            Skybox = new Skybox(Programs[ProgramID.Skybox], @"Resources\Objects\sphere.obj", false);
            Skybox.CreateBuffer();
            // Board
            Board = new Board(Programs[ProgramID.Full], Programs[ProgramID.Player], this);
            Board.Model.CreateBuffer();
            Models.Add(Board.Model.ID, Board.Model);
            // Player model
            AModels.Add("Player", new ModelObject(
                            Programs[ProgramID.Player],
                            @"Resources\Objects\player.obj",
                            Color4.White,
                            Vector3.Zero,
                            Vector3.Zero,
                            new Vector3(0.1f),
                            @"Resources\Objects\player.mtl",
                            @"b0b0b0"));
            AModels["Player"].CreateBuffer();
            // Dice
            DiceOne = new Dice(Programs[ProgramID.Dice],
                               new Vector3(0.0f, 0.05f, 0.25f), Vector3.Zero, new Vector3(0.05f));
            DiceTwo = new Dice(Programs[ProgramID.Dice],
                               new Vector3(0.25f, 0.05f, 0.0f), Vector3.Zero, new Vector3(0.05f));
            DiceOne.Model.CreateBuffer();
            DiceTwo.Model.CreateBuffer();
            Models.Add(DiceOne.Model.ID, DiceOne.Model);
            Models.Add(DiceTwo.Model.ID, DiceTwo.Model);

            // Loads the controls of the program.
            LoadControls();

            // Reset hide/show states for all menus.
            Menu.HIDEALL();
            MnuMain.ShowAll();
            MnuTest.ShowAll();
        }