Esempio n. 1
0
        /// <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;
        }
Esempio n. 2
0
        /// <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();
        }
Esempio n. 3
0
        public KingOfThePit()
        {
            ptr = this;

            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);
        }