Esempio n. 1
0
        /// <summary>
        /// Initializes this instance and starts listening to keyboard input events
        /// </summary>
        /// <exception cref="NotSupportedException">Is thrown if keyboard manager is used on an unsupported platform.</exception>
        public override void Initialize()
        {
            base.Initialize();

            // create the platform-specific instance
            platform = KeyboardPlatform.Create(Game.Window.NativeWindow);

            // bind to platform-independent events
            platform.KeyDown += HandleKeyDown;
            platform.KeyUp   += HandleKeyUp;
        }