Esempio n. 1
0
        float yObj;                             //get x pos for leap

        public GS_GameMenu(Game1 game, SpriteBatch Batch, SpriteFont Font, Texture2D bgImage, 
            List<GameObject> objMenu, GameObject cursor,
            SingleListener listener)
            : base(game)
        {
            #region GS_GameMenu Construct
            spriteFont = Font;
            spriteBatch = Batch;
            backImage = bgImage;
            objectMenu = objMenu;
            cursorGame = cursor;
            leapListener = listener;
            GAME = game;
            #endregion
          
        }
 public GS_RecognizeMnist200(Game1 game, SpriteBatch Batch, SpriteFont Font, Texture2D bgImage,
     List<GameObject> objMenu, GameObject cursor,
     SingleListener listener)
     : base(game)
 {
     #region GS_GameMenu Construct
     spriteFont = Font;
     spriteBatch = Batch;
     backImage = bgImage;
     objectMenu = objMenu;
     cursorGame = cursor;
     leapListener = listener;
     GAME = game;
     #endregion
     _boardPosition = new Vector2(game.GraphicsDevice.Viewport.Width / 2 - (19 * 12) / 2, game.GraphicsDevice.Viewport.Height / 2 - (19 * 12) / 2);
     objectVector = new double[_board.Length];
 }
Esempio n. 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);
            textureObj = Content.Load<Texture2D>("pointer");
            textureAngka = Content.Load<Texture2D>("Btn_angka");
            textureAngka200 = Content.Load<Texture2D>("Btn_angka200");
            textureAdd = Content.Load<Texture2D>("Btn_add");
            textureHuruf = Content.Load<Texture2D>("Btn_huruf");
            textureExit = Content.Load<Texture2D>("Btn_exit");
            textureBox = Content.Load<Texture2D>("circle");

            textureFont = Content.Load<SpriteFont>("font");

            finger = new GameObject(textureObj, Vector2.Zero);
            finger.color = Color.Snow;
            menuADD = new GameObject(textureAdd, new Vector2(graphics.GraphicsDevice.Viewport.Width / 2 - textureAdd.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2 - textureAdd.Height / 2 - 100));
            menuADD.color = Color.White;
            menuRH = new GameObject(textureHuruf, new Vector2(graphics.GraphicsDevice.Viewport.Width / 2 - textureHuruf.Width / 2, menuADD.Position.Y + menuADD.BoundingBox.Height - 50 + textureHuruf.Height / 2));
            menuRH.color = Color.White;
            menuExit = new GameObject(textureExit, new Vector2(graphics.GraphicsDevice.Viewport.Width / 2 - textureExit.Width / 2, menuRH.Position.Y + menuRH.BoundingBox.Height + textureExit.Height / 2));
            menuExit.color = Color.White;
            menuRM = new GameObject(textureAngka, new Vector2(graphics.GraphicsDevice.Viewport.Width / 2 - textureAngka.Width / 2 - textureAngka.Width - 50, menuADD.Position.Y + menuADD.BoundingBox.Height - 50 + textureAngka.Height / 2));
            menuRM.color = Color.White;
            menuRM200 = new GameObject(textureAngka200, new Vector2(graphics.GraphicsDevice.Viewport.Width / 2 + textureAngka200.Width / 2 + 50, menuADD.Position.Y + menuADD.BoundingBox.Height - 50 + textureAngka200.Height / 2));
            menuRM200.color = Color.White;

            menuBox = new GameObject(textureBox, new Vector2(0,0));
            menuExit.color = Color.White;

            gameMenu.Add(menuADD);
            gameMenu.Add(menuExit);
            gameMenu.Add(menuRM); 
            gameMenu.Add(menuRH);
            gameMenu.Add(menuRM200);

            recognizeMenu.Add(menuBox);

            gs_StartScreen = new GS_GameMenu(this, spriteBatch, textureFont, Content.Load<Texture2D>("title"), gameMenu, finger, listener);
            gs_RecognizeHuruf = new GS_RecognizeHuruf(this, spriteBatch, textureFont, Content.Load<Texture2D>("titlehuruf"), recognizeMenu, finger, listener);
            gs_RecognizeMnist = new GS_RecognizeMnist(this, spriteBatch, textureFont, Content.Load<Texture2D>("titleangka"), recognizeMenu, finger, listener);
            gs_RecognizeMnist200 = new GS_RecognizeMnist200(this, spriteBatch, textureFont, Content.Load<Texture2D>("titleangka200"), recognizeMenu, finger, listener);
            gs_AddData = new GS_AddData(this, spriteBatch, textureFont, Content.Load<Texture2D>("titleadd"), recognizeMenu, finger, listener);
            

            changeState(StateMachine.ScreenState.GAME_MENU);
            // TODO: use this.Content to load your game content here
        }