Beispiel #1
0
 public void update() {
   if (isScreen) {
     for (Screen s : screens) {
       if (s.isVisible()) {
         s.update();
       }
     }
   } else {
     if (Key.F5.isDown()) {
       if (Settings.DEBUG) {
         Settings.DEBUG = false;
       } else {
         Settings.DEBUG = true;
       }
     }
     player.getWorld().update();
     player.update();
   }
 }
Beispiel #2
0
  public void paint(Graphics g) {
    Engine.graphics = g;

    if (isScreen) {
      for (Screen s : screens) {
        if (s.isVisible()) {
          s.draw();
        }
      }
    } else {
      player.getWorld().draw();
      player.draw();

      if (Settings.DEBUG) {
        // Screen.renderString(Sidecraft.player.getLocation().toString() + newLine +
        // mouseCoords.toString() + newLine + "Mouse position" + mouseCoords.toVector2().ToString(),
        // new Vector2(10, 10), Color.Black);
        Engine.renderString(player.getLocation().toString(), 90, 110, Color.blue);
        Engine.renderString("0", new Location(0, 0), Color.blue);
      }
    }
  }