示例#1
0
        public void KeysPressed(KeyEvent evt)
        {
            if (evt.ChangedKeys.Contains(Keys.Escape)) {
                this.Exit();
            }
            if (evt.ChangedKeys.Contains(Keys.D)) {
                if (World.IsNight)
                    World.IsNight = false;
            }

            if (evt.ChangedKeys.Contains(Keys.N)) {
                if (!World.IsNight)
                    World.IsNight = true;
            }

            if (evt.ChangedKeys.Contains(Keys.F12)) {
                this.graphics.ToggleFullScreen();
            }
        }
示例#2
0
 public void KeysReleased(KeyEvent evt)
 {
     /* Ignore */
 }
示例#3
0
 private static void FireKeyReleased(KeyEvent evt)
 {
     foreach (KeyListener kl in keyListeners) {
         kl.KeysReleased(evt);
     }
 }