Package org.newdawn.slick

Examples of org.newdawn.slick.Input$NullOutputStream


    Text.drawString(120, Text.extractLength("Esc - exit to main menu", 120), 545, "Esc - exit to main menu", Color.black, 0);
  }
 
  public void update(GameContainer gc, StateBasedGame sbg, int delta)
  {
    Input input = gc.getInput();
    if (input.isKeyPressed(Input.KEY_ENTER)) sbg.enterState(Game.GAMEPLAYSTATE);
    else if (input.isKeyPressed(Input.KEY_ESCAPE)) sbg.enterState(Game.MAINMENUSTATE);
  }
View Full Code Here


 
  private int util_skip_timer = 70;
 
  private void draw_skip_text(Graphics g)
  {
    Input input = Game.app.getInput();
    if (input.isKeyDown(Input.KEY_SPACE))
    {
      if (util_skip_timer < 45)
        Text.drawString(60, Text.extractLength("Hold 'SPACE' to skip intro", 60), 7, "Hold 'SPACE' to skip intro", Color.white, 1);
      else
        Text.drawString(60, Text.extractLength("Hold 'SPACE' to skip intro", 60), 7, "Hold 'SPACE' to skip intro", Color.white);
View Full Code Here

  /* MOVEMENTS */   
 
    private void update_player_movements()
    {
      util_x = pl_x;
      Input input = Game.app.getInput();
      update_player_movement_moveleft(input);
      update_player_movement_moveright(input);
      update_player_movement_jump(input);
      update_player_movement_fall(input);
    }
View Full Code Here

  /* PLAYER FACING */
   
    private void update_player_facing()
    {
      pl_center.setLocation(pl_x + (float)width/2, pl_y + (float)height/2);
      Input input = Game.app.getInput();
      if (input.isKeyDown(Input.KEY_D) || input.isKeyDown(Input.KEY_RIGHT))
        util_facing = true;
      else if (input.isKeyDown(Input.KEY_A) || input.isKeyDown(Input.KEY_LEFT))
        util_facing = false;
    }
View Full Code Here

     
    /* UTIL UPDATE */
         
      private void update_util()
      {
        Input input = Game.app.getInput();
        if (input.isKeyPressed(Input.KEY_GRAVE))
          DebugConsole.setConsole()
      }
View Full Code Here

    Text.drawString(120, Text.extractLength("Esc - exit to main menu", 120), 545, "Esc - exit to main menu", Color.black, 0);
  }

  public void update(GameContainer gc, StateBasedGame sbg, int delta)
  {
    Input input = gc.getInput();
    if (input.isKeyPressed(Input.KEY_ENTER)) sbg.enterState(Game.GAMEPLAYSTATE);
    else if (input.isKeyPressed(Input.KEY_ESCAPE)) sbg.enterState(Game.MAINMENUSTATE);
  }
View Full Code Here

    this.mode = GuiSimulatorMode.SLICK_COMPONENT_DRAGDROP;
  }

  @Override
  public void update(GameContainer gc, int delta) throws SlickException {
    final Input input = gc.getInput();
    final Point2d mouseClickedPointPosition = new Point2d(input.getMouseX(), input.getMouseY());

    if (input.isKeyPressed(Input.KEY_S)) {
      simulator.setSimulating(true);
    } else if (input.isKeyPressed(Input.KEY_Q)) {
      simulator.setSimulating(false);
    }

    // SETTING MODE
    if (input.isKeyPressed(Input.KEY_F2)) {
      this.mode = GuiSimulatorMode.REDIRECT_ROBOTS_TO_POINT;
    } else if (input.isKeyPressed(Input.KEY_F1)) {
      this.mode = GuiSimulatorMode.SLICK_COMPONENT_DRAGDROP;
      deselectAllSelectableSlickComponents();
    }

    if (input.isKeyDown(Input.KEY_RIGHT)) {
      simulator.setSimulatorSpeed(simulator.getSimulatorSpeed() + 5);
    } else if (input.isKeyDown(Input.KEY_LEFT)) {
      simulator.setSimulatorSpeed(simulator.getSimulatorSpeed() - 5);
    }

    // INTERPRETE MODE
    if (mode == GuiSimulatorMode.REDIRECT_ROBOTS_TO_POINT) {
      if (input.isMouseButtonDown(0)) {
        redirectRobotsToPoint(mouseClickedPointPosition);
      }
    } else if (mode == GuiSimulatorMode.SLICK_COMPONENT_DRAGDROP || mode == GuiSimulatorMode.ROBOT_DRAGDROP_ROTATION) {
      interpreteDragAndDropMode(input, mouseClickedPointPosition);
    }
View Full Code Here

    vector_mouse.normalise(); //subtract and normalise
    gun_point.setLocation(GameplayState.player.getX()+((b)?9:16)+gun_dist*vector_mouse.x,
        GameplayState.player.getY()+13+gun_dist*vector_mouse.y); //sets the location of gun point

    /* SHOOTING UPDATE */
    Input inp = gc.getInput();
    if (inp.isKeyDown(Input.KEY_R) && util_chamber != 0 && util_chamber != opt_chamber)
    {
      util_reload_chamber = opt_chamber;
      util_chamber = 0;
    }
    if (util_chamber == 0)
View Full Code Here

   
  public static boolean perform(Graphics g)
  {
    if (show_string[0] == null || head == null || image == null)
      return true;
    Input input = Game.app.getInput();
    if (input.isKeyPressed(Input.KEY_SPACE))
    {
      if (phase == 1)
        return true;
      else if (phase == 0)
      {
View Full Code Here

      util_particle_delay = 35;
  }

  private void checkIsRepairing(GameContainer gc)
  {
    Input input = gc.getInput();
    if (input.isKeyDown(Input.KEY_S) || input.isKeyDown(Input.KEY_DOWN) && repair_percent < 100 && !is_repairing)
    {
      int pl_x = (int)GameplayState.player.pl_x;
      if (pl_x >= x && pl_x <= x+160)
        is_repairing = true;
    }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.Input$NullOutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.