Пример #1
0
        public void keyPress(Screen screen)
        {
            screen.input(Keyboard.GetState(), isKeyDown);

            if (Keyboard.GetState().IsKeyDown(Keys.Enter) || Keyboard.GetState().IsKeyDown(Keys.Up) || Keyboard.GetState().IsKeyDown(Keys.Down) ||
                Keyboard.GetState().IsKeyDown(Keys.W) || Keyboard.GetState().IsKeyDown(Keys.S))
                isKeyDown = true;
            else
                isKeyDown = false;
        }
Пример #2
0
 public void setScreen(Screen screen)
 {
     this.screen = screen;
     if (screen != null) { screen.init(this); }
 }