Package org.newdawn.slick

Examples of org.newdawn.slick.Image


  }

  private void load(String identifier) {
    try {
      if (identifier.endsWith(".png")) { // Bild laden
        this.images.put(identifier, new Image(identifier));
      } else if (identifier.endsWith(".png?reverse")) { // Umgedrehted
        // Bild laden
        this.images
            .put(identifier,
                getImage(
View Full Code Here


   * @return Das Bild.
   */
  public Image getImage(String id) {
    id = normalizeIdentifier(id);

    Image image = this.images.get(id);
    if (image == null) {
      load(id);
      return this.images.get(id);
    } else {
      return image;
View Full Code Here

   * @return Das umgedrehte Bild.
   */
  public Image getRevertedImage(String id) {
    id = normalizeIdentifier(id);

    Image image = this.images.get(id + "?reverse");
    if (image == null) {
      load(id + "?reverse");
      return this.images.get(id + "?reverse");
    } else {
      return image;
View Full Code Here

   * @param punteggio
   * @throws SlickException
   */
  public void render(Graphics g, int pf) throws SlickException{
        // comandi a schermo
    g.drawImage(new Image("data/grafica/roundBox.png"), 0, 0);
        g.drawString("Uccidi tutte le strega!", 10, 25);
//        g.drawString("Comandi :", 10, 50);
        g.drawString("  Movimento: frecce", 10, 40);
        g.drawString("  Spazio : attacca", 10, 50);
        g.drawString("  ESC esci", 10, 60);
        //g.drawRect(5, 575, 100, 30);
        g.drawImage(new Image("data/grafica/roundBox.png"), 5, 575);
        //g.drawImage(, 5, 575, 5, 605);
        g.drawString("  PF : "+pf, 10, 580);
  }
View Full Code Here

   * @param punteggio
   * @throws SlickException
   */
  public void render(Graphics g, int punteggio) throws SlickException{
        // comandi a schermo
    g.drawImage(new Image("data/grafica/roundBox.png"), 0, 0);
        g.drawString("Uccidi tutte la strega!", 10, 25);
//        g.drawString("Comandi :", 10, 50);
        g.drawString("  Movimento: frecce", 10, 50);
        //g.drawString("  A, aggiunge una strega", 10, 90);
        g.drawString("  ESC esci", 10, 60);
        //g.drawRect(5, 575, 100, 30);
        g.drawImage(new Image("data/grafica/roundBox.png"), 5, 575);
        //g.drawImage(, 5, 575, 5, 605);
        g.drawString("  PUNTEGGIO : "+punteggio, 10, 580);
  }
View Full Code Here

        g.drawString("Comandi :", 10, 50);
        g.drawString("  frecce direzioniali per muoversi", 10, 75);
        g.drawString("  A, aggiunge una strega", 10, 90);
        g.drawString("  ESC esci", 10, 105);
        //g.drawRect(5, 575, 100, 30);
        g.drawImage(new Image("data/grafica/roundBox.png"), 5, 575);
        //g.drawImage(, 5, 575, 5, 605);
        g.drawString("  PUNTEGGIO : "+punteggio, 10, 580);
       
    }
View Full Code Here

  public ArrayList<Oggetto> getOggetti() {
    ArrayList<Oggetto> actor = new ArrayList<Oggetto>();
        for (int x=0;x<map.getWidth();x++) {
            for (int y=0;y<map.getHeight();y++) {
              if (oggetti[x][y]){
                Image tile = map.getTileImage(x, y, Helper.LAYER_OBJECT);
                OggettoGenerico og = new OggettoGenerico(tile,x, y, getIdOggetto(x,y));
                actor.add(og);
              }
            }
        }
View Full Code Here

    public PintaCancha(int wm, int hm, int estadioIdx) throws SlickException {
        this.wm = wm;
        this.hm = hm;
        this.estadioIdx = estadioIdx;
        if (this.estadioIdx == 0) {
            entorno = new Image("imagenes/noucamp/noucamp_entorno.jpg");
            estadio = new Image("imagenes/noucamp/noucamp_estadio.png");
        } else {
            entorno = new Image("imagenes/bernabeu/entorno.bernabeu.jpg");
            estadio = new Image("imagenes/bernabeu/bernabeu.png");
        }
        cancha = new Image("imagenes/cancha.png", Color.black);
        pasto = new Image("imagenes/pasto.png");
        arcilla = new Image("imagenes/arcilla.png");
        arcoSup = new Image("imagenes/arco_inferior.1.2.png");
        arcoInf = new Image("imagenes/arco_superior.1.2.png");
    }
View Full Code Here

  }

  public PintaJugador() throws SlickException {
    for (int j = 0; j < 7; j++) {
      for (int i = 1; i < 7; i++) {
        img[j][i - 1] = new Image("imagenes/jugador/" + i + j + ".png");
      }
    }
    sombra = new org.newdawn.slick.Image("imagenes/sombra.png");
  }
View Full Code Here

        /**Instancia la pintura de la publicidad horizontal y vertical*/
  public PintaPublicidad(String h, String v, int wm, int hm) throws SlickException {
    this.wm = wm;
    this.hm = hm;
    this.v = new Image(v);
    this.h = new Image(h);
  }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.Image

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.