Example #1
0
        /// <summary>
        /// Creates a <see cref="ManaWindow"/> and runs the game within it.
        /// </summary>
        public void Run()
        {
            using var window = new ManaWindow(_initializationParameters);

            Window = window;

            window.Run(this);
        }
Example #2
0
        public ManaWindowInputProvider(ManaWindow window)
        {
            Window             = window;
            Window.MouseEnter += WindowOnMouseEnter;
            Window.MouseLeave += WindowOnMouseLeave;
            Window.MouseMove  += WindowOnMouseMove;

            KeyTyped += Input.OnKeyTyped;
        }
Example #3
0
        public ManaWindowInputProvider(ManaWindow window)
        {
            Window             = window;
            Window.MouseEnter += WindowOnMouseEnter;
            Window.MouseLeave += WindowOnMouseLeave;
            Window.MouseMove  += WindowOnMouseMove;
            Window.KeyPress   += WindowOnKeyPress;

            _previousGamePadStates = new GamePadState[SUPPORTED_GAMEPAD_COUNT];
            _currentGamePadStates  = new GamePadState[SUPPORTED_GAMEPAD_COUNT];

            KeyTyped += Input.OnKeyTyped;
        }
Example #4
0
File: Game.cs Project: Perksey/Mana
 /// <summary>
 /// Creates a <see cref="ManaWindow"/> and runs the game within it.
 /// </summary>
 public void Run()
 {
     using var window = new ManaWindow();
     Window           = window;
     window.Run(this);
 }