/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here currentState = StateMachine.Instance; currentState.state = StateMachine.ScreenState.GAME_MENU; StateMachine.Instance.resWidth = graphics.GraphicsDevice.Viewport.Width; StateMachine.Instance.resHeight = graphics.GraphicsDevice.Viewport.Height; leapController = new Controller(); listener = new SingleListener(); leapController.EnableGesture(Gesture.GestureType.TYPE_CIRCLE); leapController.EnableGesture(Gesture.GestureType.TYPESCREENTAP); leapController.AddListener(listener); base.Initialize(); }
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]; }