/// <summary> /// Ininializes all the necessary variables before the game starts /// </summary> private void Initialize() { DKTitle.Initialize(new Vector2(_graphicsDevice.Viewport.Width / 2 - DKTitle._texture.Width / 2, _graphicsDevice.Viewport.Height * 0.05f)); playButton.Initialize(new Vector2(_graphicsDevice.Viewport.Width * 0.25f, _graphicsDevice.Viewport.Height * 0.75f)); playButton.Input = new Input() { Action = new List <Keys>() { Keys.Space, Keys.F, Keys.G, Keys.H, Keys.V, Keys.B, Keys.N } }; infoButton.Initialize(new Vector2(_graphicsDevice.Viewport.Width * 0.45f, _graphicsDevice.Viewport.Height * 0.75f)); infoButton.Input = new Input() { Action = new List <Keys>() { Keys.Space, Keys.F, Keys.G, Keys.H, Keys.V, Keys.B, Keys.N } }; exitButton.Initialize(new Vector2(_graphicsDevice.Viewport.Width * 0.65f, _graphicsDevice.Viewport.Height * 0.75f)); exitButton.Input = new Input() { Action = new List <Keys>() { Keys.Space, Keys.F, Keys.G, Keys.H, Keys.V, Keys.B, Keys.N } }; }
/// <summary> /// Ininializes all the necessary variables before the game starts /// </summary> public void Initialize() { DKTitle.Initialize(new Vector2(_graphicsDevice.Viewport.Width / 2 - DKTitle._texture.Width / 2, _graphicsDevice.Viewport.Height * 0.05f)); joystickRightLeft.Initialize(new Vector2(_graphicsDevice.Viewport.Width * 0.1f, _graphicsDevice.Viewport.Height * 0.3f)); marioWalking.Initialize(new Vector2(joystickRightLeft._position.X + joystickRightLeft._texture.Width + _graphicsDevice.Viewport.Width * 0.1f, _graphicsDevice.Viewport.Height * 0.3f)); marioClimbing.Initialize(new Vector2(_graphicsDevice.Viewport.Width * 0.8f, _graphicsDevice.Viewport.Height * 0.3f)); joystickUpDown.Initialize(new Vector2(marioClimbing._position.X - joystickUpDown._texture.Width - _graphicsDevice.Viewport.Width * 0.1f, _graphicsDevice.Viewport.Height * 0.3f - joystickUpDown._texture.Height / 7)); arcadeButtons.Initialize(new Vector2(_graphicsDevice.Viewport.Width * 0.1f - arcadeButtons._texture.Width / 4, _graphicsDevice.Viewport.Height * 0.5f)); marioJumping.Initialize(new Vector2(arcadeButtons._position.X + arcadeButtons._texture.Width + _graphicsDevice.Viewport.Width * 0.1f, _graphicsDevice.Viewport.Height * 0.5f)); goBackButton.Initialize(new Vector2(_graphicsDevice.Viewport.Width * 0.85f, _graphicsDevice.Viewport.Height * 0.8f)); goBackButton.Input = new Input() { Action = new List <Keys>() { Keys.Space, Keys.F, Keys.G, Keys.H, Keys.V, Keys.B, Keys.N } }; }