Package games.stendhal.client.sprite

Examples of games.stendhal.client.sprite.Sprite.draw()


    // Top left corner
    sprite = images[0];
    sprite.draw(g, 0, 0);
    // Top right corner
    sprite = images[2];
    sprite.draw(g, rightX, 0);
    // Bottom left corner
    sprite = images[6];
    sprite.draw(g, 0, bottomY);
    // Bottom right corner
    sprite = images[8];
View Full Code Here


    // Top right corner
    sprite = images[2];
    sprite.draw(g, rightX, 0);
    // Bottom left corner
    sprite = images[6];
    sprite.draw(g, 0, bottomY);
    // Bottom right corner
    sprite = images[8];
    sprite.draw(g, rightX, bottomY);
  }
}
View Full Code Here

   */
  private void drawHair(final int code, final Graphics g) {
    final Sprite sprite = store.getTile(ostore.getHairSprite(code), PLAYER_WIDTH,
        direction * PLAYER_HEIGHT, PLAYER_WIDTH, PLAYER_HEIGHT);

    sprite.draw(g, 2, 2);
  }

  /**
   * Redraws the head image from an outfit code.
   *
 
View Full Code Here

   */
  private void drawHead(final int code, final Graphics g) {
    final Sprite sprite = store.getTile(ostore.getHeadSprite(code), PLAYER_WIDTH,
        direction * PLAYER_HEIGHT, PLAYER_WIDTH, PLAYER_HEIGHT);

    sprite.draw(g, 2, 2);
  }

  /**
   * Redraws the hair image from an outfit code.
   *
 
View Full Code Here

  private void drawDress(final int code, final Graphics g) {
    final Sprite sprite = store.getTile(ostore.getDressSprite(code),
        PLAYER_WIDTH, direction * PLAYER_HEIGHT, PLAYER_WIDTH,
        PLAYER_HEIGHT);

    sprite.draw(g, 2, 2);
  }

  /**
   * Redraws the hair image from an outfit code.
   *
 
View Full Code Here

   */
  private void drawBase(final int code, final Graphics g) {
    final Sprite sprite = store.getTile(ostore.getBaseSprite(code), PLAYER_WIDTH,
        direction * PLAYER_HEIGHT, PLAYER_WIDTH, PLAYER_HEIGHT);

    sprite.draw(g, 2, 2);
  }

  /**
   * Redraw the final player.
   *
 
View Full Code Here

   
    Sprite image = style.getBackground();
   
    for (int i = x; i < x + width; i += image.getWidth()) {
      for (int j = y; j < y + height; j += image.getHeight()) {
        image.draw(graphics, i, j);
      }
    }
    graphics.dispose();
  }
 
View Full Code Here

    final ImageSprite sprite = new ImageSprite(layer);
    final Graphics g = sprite.getGraphics();

    // Dress layer
    layer = getDressSprite(dresscode);
    layer.draw(g, 0, 0);

    // Head layer
    layer = getHeadSprite(headcode);
    layer.draw(g, 0, 0);
View Full Code Here

    layer = getDressSprite(dresscode);
    layer.draw(g, 0, 0);

    // Head layer
    layer = getHeadSprite(headcode);
    layer.draw(g, 0, 0);

    // Hair layer
    layer = getHairSprite(haircode);
    layer.draw(g, 0, 0);
   
View Full Code Here

    layer = getHeadSprite(headcode);
    layer.draw(g, 0, 0);

    // Hair layer
    layer = getHairSprite(haircode);
    layer.draw(g, 0, 0);
   
    // Item layer
    layer = getDetailSprite(detailcode);
    layer.draw(g, 0, 0);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.