Пример #1
0
        public override void Initialize()
        {
            content = new ContentManager(Game.Services);
            content.RootDirectory = "Content";

            videoMain = new VideoMain(mainGame, this);
            videoMain.Initialize();

            //Elimina LoadScreen
            if (this.mainGame.Components.Contains(this.mainGame.loadScreen))
            {
                this.mainGame.Components.Remove(this.mainGame.loadScreen);
            }

            textrectMenu = content.Load<Texture2D>("Screens/Main/menu");
            textSelect = content.Load<Texture2D>("Screens/Main/selector");

            cuboSelect = new CubePrimitive(mainGame.graphics.GraphicsDevice, 4);

            //backGround = content.Load<Texture2D>("Screens/Main/BackGroundMain3");

            //Create a Menu
            IniciaMenu(2, Color.Orange, Color.DarkGray, new Vector2(this.mainGame.graphics.PreferredBackBufferWidth - 250, this.mainGame.graphics.PreferredBackBufferHeight/2 + 20), content.Load<SpriteFont>("Fonts/Font1"), 40, anchor.bottom_right);
            AddElement(0, "Play");
            AddElement(1, "Controls");

            base.Initialize();
        }
Пример #2
0
        public void Initialize()
        {
            //this.Textura = gameScreen.mainGame.Content.Load<Texture2D>("Screens/Pause/Pause");
            this.textrectPause = gameScreen.mainGame.Content.Load<Texture2D>("Screens/Pause/pause");
         
            cuboSelect = new CubePrimitive(gameScreen.mainGame.graphics.GraphicsDevice, 4);

            //Create a Menu
            IniciaMenu(3, Color.Orange, Color.DarkGray, new Vector2(gameScreen.mainGame.Window.ClientBounds.Width / 2 , gameScreen.mainGame.Window.ClientBounds.Height / 2 + 25f), gameScreen.Content.Load<SpriteFont>("Fonts/Font1"), 40, anchor.top_center);
            AddElement(0, "Continue");
            AddElement(1, "Controls");
            AddElement(2, "Exit");

            this.Posicion.X = 0;
            this.Posicion.Y = 0;
        }