Exemple #1
0
  public World(Player p, SimpleGUI sg) {
    globe = sg;

    globe.registerToKeyboard(event);
    globe.registerToTimer(this);

    globe.setBackgroundColor(new Color(104, 136, 255));
    globe.drawFilledBox(
        0, globe.getHeight() - 50, globe.getWidth(), 50, Color.GREEN, 1.0, "Ground");

    p1 = p;
    player_X = p1.xTopLeft;
    player_Y = p1.yTopLeft;
    player_size = (int) p1.width;

    visualize();
  }