Package org.newdawn.slick

Examples of org.newdawn.slick.Image


  }

  @Override
  public void initialize() {
    try {
      crosshair = new Image("crosshair.png");
    } catch (SlickException e) {
      e.printStackTrace();
    }

    cs = world.getSystem(CameraSystem.class);
View Full Code Here


    healthColor = new Color(72f / 255f, 1f, 0f, 1f);
    bgColor = new Color(1f, 1f, 1f, 0.2f);

    try {
      font = new AngelCodeFont("fonts/normal.fnt", "fonts/normal_0.png");
      bar = new Image("bar.png");
      statusBar = new Image("statusBar.png");
      hudBg = new Image("hudBg.png");
      minimapBg = new Image("minimapBg.png");
    } catch (SlickException e) {
      e.printStackTrace();
    }

    ensurePlayerEntity();
View Full Code Here

    healthColor = new Color(72f / 255f, 1f, 0f, 1f);
    bgColor = new Color(1f, 1f, 1f, 0.2f);

    try {
      bar = new Image("healthBar.png");
    } catch (SlickException e) {
      e.printStackTrace();
    }
   
    cameraSystem = world.getSystem(CameraSystem.class);
View Full Code Here

  }

  @Override
  public void initialize() {
    try {
      tile = new Image("tile.png");
    } catch (SlickException e) {
      e.printStackTrace();
    }

    cs = world.getSystem(CameraSystem.class);
View Full Code Here

        GL.glBlendFunc(SGL.GL_SRC_ALPHA, SGL.GL_ONE);
      }
     
      // now get the particle pool for this emitter and render all particles that are in use
      ParticlePool pool = (ParticlePool) particlesByEmitter.get(emitter);
      Image image = emitter.getImage();
      if (image == null) {
        image = this.sprite;
      }
     
      if (!emitter.isOriented() && !emitter.usePoints(this)) {
        image.startUse();
      }
     
      for (int i = 0; i < pool.particles.length; i++)
      {
        if (pool.particles[i].inUse())
          pool.particles[i].render();
      }
     
      if (!emitter.isOriented() && !emitter.usePoints(this)) {
        image.endUse();
      }

      // reset additive blend mode
      if (emitter.useAdditive()) {
        GL.glBlendFunc(SGL.GL_SRC_ALPHA, SGL.GL_ONE_MINUS_SRC_ALPHA);
View Full Code Here

  private void loadSystemParticleImage() {
    AccessController.doPrivileged(new PrivilegedAction() {
            public Object run() {
            try {
              if (mask != null) {
                sprite = new Image(defaultImageName, mask);
              } else {
                sprite = new Image(defaultImageName);
              }
            } catch (SlickException e) {
              Log.error(e);
              defaultImageName = null;
            }
View Full Code Here

     
      trans = new Color(c);
    }

    if (loadImage) {
      Image image = new Image(map.getTilesLocation()+"/"+ref,false,Image.FILTER_NEAREST,trans);
      setTileSetImage(image);
    }
   
    NodeList pElements = element.getElementsByTagName("tile");
    for (int i=0;i<pElements.getLength();i++) {
View Full Code Here

  {
    if (state == 3)
    {
      float offset_x = util_img[0].getWidth()*scale/2;
      float offset_y = util_img[0].getHeight()*scale/2;
      Image img = util_img[0].getScaledCopy(1+scale);
      img.setAlpha(alpha);
      img.draw((int)x-offset_x, (int)y-offset_y);
    }
    else if (state != 0)
    { 
      switch(frame)
      {
View Full Code Here

    {
      int x = this.x+box_x_offset_current;
      util_img_box.draw(x, y);
      if (state == IS.WAITING && chute_state < 4)
      {
        Image img = util_img_chute_off[chute_state].getFlippedCopy((chute_reverse?true:false), false);
        img.setAlpha(1-((chute_state+1)*0.15f)); //set alpha depending on chute state
        img.draw(x-9, y-59);
        chute_delay--;
        if (chute_delay < 1)
        {
          chute_delay = 8;
          chute_state++;
View Full Code Here

    rifle.getFlippedCopy(rotation, false).draw((rotation?x-35:x+25), GameplayState.ground_level-28);
    if (opt_firerate > shoot_moment-Elements.extractLevel(ITEM.P_UPG_SNIPER)*30)
    {
      if (rotation)
      {
        Image shoot_;
        shoot_ = shoot.getFlippedCopy(true, false);
        shoot_.setAlpha(1-(opt_firerate-(shoot_moment-Elements.extractLevel(ITEM.P_UPG_SNIPER)*30))*0.18f);
        shoot_.draw(x-53, GameplayState.ground_level-26);
      }
      else
      {
        shoot.setAlpha(1-(opt_firerate-(shoot_moment-Elements.extractLevel(ITEM.P_UPG_SNIPER)*30))*0.18f);
        shoot.draw(x+76, GameplayState.ground_level-26);
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.