예제 #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);
     }
 }