/// <summary> /// Constructs a new input state. /// </summary> public InputHelper(ResolutionIndependentRenderer resolutionIndRend) { this.resolutionIndRend = resolutionIndRend; KeyboardState = new KeyboardState(); GamePadState = new GamePadState(); MouseState = new MouseState(); VirtualState = new GamePadState(); PreviousKeyboardState = new KeyboardState(); PreviousGamePadState = new GamePadState(); PreviousMouseState = new MouseState(); PreviousVirtualState = new GamePadState(); _cursorIsVisible = false; IsCursorMoved = false; #if WINDOWS_PHONE IsCursorValid = false; #else IsCursorValid = true; #endif Cursor = Vector2.Zero; _handleVirtualStick = false; }
/// <summary> /// The constructor for the Camera2D class. /// </summary> /// <param name="graphics"></param> public Camera(GraphicsDevice graphics, ResolutionIndependentRenderer resolutionIndependence) { _graphics = graphics; this.resolutionIndependence = resolutionIndependence; ResetMatrice(); ResetCamera(); }
public Bloodbender() { ptr = this; rdn = new Random(); mouse = Mouse.GetState(); graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; graphics.PreferredBackBufferWidth = width; graphics.PreferredBackBufferHeight = height; //graphics.HardwareModeSwitch = false; //graphics.SynchronizeWithVerticalRetrace = false; //IsFixedTimeStep = false; //graphics.IsFullScreen = true; resolutionIndependence = new ResolutionIndependentRenderer(this); }