Package org.newdawn.slick

Examples of org.newdawn.slick.SpriteSheet


   * Set the image to use for this sprite sheet image to use for this tileset
   *
   * @param image The image to use for this tileset
   */
  public void setTileSetImage(Image image) {
    tiles = new SpriteSheet(image, tileWidth, tileHeight, tileSpacing, tileMargin);
    tilesAcross = tiles.getHorizontalCount();
    tilesDown = tiles.getVerticalCount();

    if (tilesAcross <= 0) {
      tilesAcross = 1;
View Full Code Here


    }

    public static SpriteSheet getAmbulanceSpriteSheet() {
        if (ambulanceSprite == null) {
            try {
                ambulanceSprite = new SpriteSheet("data/sprites/ambulance.png", 32, 32, Color.magenta);
            } catch (SlickException ex) {
                Logger.getLogger(GraphicableFactory.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return ambulanceSprite;
View Full Code Here

    }

    public static SpriteSheet getFireTruckSpriteSheet() {
        if (fireTruckSprite == null) {
            try {
                fireTruckSprite = new SpriteSheet("data/sprites/fireTruck.png", 32, 32, Color.magenta);
            } catch (SlickException ex) {
                Logger.getLogger(GraphicableFactory.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return fireTruckSprite;
View Full Code Here

    }

    public static SpriteSheet getGrayedFireTruckSpriteSheet() {
        if (fireTruckGrayedSprite == null) {
            try {
                fireTruckGrayedSprite = new SpriteSheet("data/sprites/sprites-bomberos-weak.png", 32, 32, Color.magenta);
            } catch (SlickException ex) {
                Logger.getLogger(GraphicableFactory.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return fireTruckGrayedSprite;
View Full Code Here

    }

    public static SpriteSheet getPoliceCarSpriteSheet() {
        if (policeCarSprite == null) {
            try {
                policeCarSprite = new SpriteSheet("data/sprites/policeCar.png", 32, 32, Color.magenta);
            } catch (SlickException ex) {
                Logger.getLogger(GraphicableFactory.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return policeCarSprite;
View Full Code Here

    }

    private static SpriteSheet getHighlightedHospitalSpriteSheet() {
        if (highlightedHospitalSprite == null) {
            try {
                highlightedHospitalSprite = new SpriteSheet("data/sprites/hospital-brillando.png", 64, 80, Color.magenta);
            } catch (SlickException ex) {
                Logger.getLogger(AnimationFactory.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return highlightedHospitalSprite;
View Full Code Here

    }

    private static SpriteSheet getHighlightedFirefighterDepartmentSpriteSheet() {
        if (highlightedFireFighterDepartmentSprite == null) {
            try {
                highlightedFireFighterDepartmentSprite = new SpriteSheet("data/sprites/bombero-brillando.png", 64, 80, Color.magenta);
            } catch (SlickException ex) {
                Logger.getLogger(AnimationFactory.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        return highlightedFireFighterDepartmentSprite;
View Full Code Here

    }

    private static SpriteSheet getFireEmergencyStatusSpriteSheet(String percentage) {

        try {
            fireEmergencyStatusSprite = new SpriteSheet("data/sprites/fire-" + percentage + ".png", 143, 28, Color.magenta);
        } catch (SlickException ex) {
            Logger.getLogger(GraphicableFactory.class.getName()).log(Level.SEVERE, null, ex);
        }
        return fireEmergencyStatusSprite;
    }
View Full Code Here

    }
    private static SpriteSheet getHeartAttackEmergencyStatusSpriteSheet(String percentage) {

        try {
            if(!percentage.equals("00")){
                heartAttackEmergencyStatusSprite = new SpriteSheet("data/sprites/people-x.png", 78, 28, Color.magenta);
            } else{
                heartAttackEmergencyStatusSprite = new SpriteSheet("data/sprites/people-ok.png", 78, 28, Color.magenta);
            }
           
        } catch (SlickException ex) {
            Logger.getLogger(GraphicableFactory.class.getName()).log(Level.SEVERE, null, ex);
        }
View Full Code Here

    }

    private static SpriteSheet getMenuBarSpriteSheet() {

        try {
            menuBarSprite = new SpriteSheet("data/sprites/menu-bar.png", 640, 48, Color.magenta);
        } catch (SlickException ex) {
            Logger.getLogger(GraphicableFactory.class.getName()).log(Level.SEVERE, null, ex);
        }

        return menuBarSprite;
View Full Code Here

TOP

Related Classes of org.newdawn.slick.SpriteSheet

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.