Example #1
0
 public ActionItem(UIGameScreen gameScreen, string text, Texture2D background, Rectangle destination, Texture2D foreground, Action method)
 {
     CallFunc         = method;
     this.Text        = text;
     this.background  = background;
     this.foreground  = foreground;
     this.Destination = destination;
     this.gameScreen  = gameScreen;
 }
Example #2
0
 public ActionItem(UIGameScreen gameScreen, string text, Texture2D background, Rectangle destination, Texture2D foreground, Action method)
 {
     CallFunc = method;
     this.Text = text;
     this.background = background;
     this.foreground = foreground;
     this.Destination = destination;
     this.gameScreen = gameScreen;
 }
Example #3
0
        /// <summary>
        /// LoadContent  will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            _spriteBatch = new SpriteBatch(GraphicsDevice);
            _particleManager.LoadContent(Content, GraphicsDevice);
            _screenManager.LoadContent(Content, GraphicsDevice);
            var gameScreen = new UIGameScreen();

            _screenManager.Add(SCREEN_STATE.InGameScreen, gameScreen, true);
            gameScreen.AddItem(new Rectangle(GraphicsDevice.Viewport.Width - 149, GraphicsDevice.Viewport.Height - 40, 148, 30), "New Game", null, ShowNewGameDialog);

            //screenManager.Add(SCREEN_STATE.IN_GAME_SCREEN, ingame_screen, true);
            _drawDriver.LoadContent(GraphicsDevice, Content, _particleManager);
            _font = Content.Load <SpriteFont>("SpriteFont1");
            bolt  = new Lightning(_lightingBoltStart, _lightingBoltEnd);
            bolt.LoadContent(Content, GraphicsDevice);
        }
Example #4
0
        /// <summary>
        /// LoadContent  will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            _spriteBatch = new SpriteBatch(GraphicsDevice);
            _particleManager.LoadContent(Content, GraphicsDevice);
            _screenManager.LoadContent(Content, GraphicsDevice);
            var gameScreen = new UIGameScreen();

            _screenManager.Add(SCREEN_STATE.InGameScreen, gameScreen, true);
            gameScreen.AddItem(new Rectangle(GraphicsDevice.Viewport.Width - 149, GraphicsDevice.Viewport.Height - 40, 148, 30), "New Game", null, ShowNewGameDialog);

            //screenManager.Add(SCREEN_STATE.IN_GAME_SCREEN, ingame_screen, true);
            _drawDriver.LoadContent(GraphicsDevice, Content, _particleManager);
            _font = Content.Load<SpriteFont>("SpriteFont1");
            bolt = new Lightning(_lightingBoltStart, _lightingBoltEnd);
            bolt.LoadContent(Content,GraphicsDevice);
        }