Package org.newdawn.slick

Examples of org.newdawn.slick.Animation


    public static GraphicableEmergency newEmergency(Call call, EmergencyType type, Integer numberOfPeople) {
        //TODO: fix this ???
        GraphicableEmergency graphEmergency = new GraphicableEmergency();

        Animation myEmergency = null;

        if (type == EmergencyType.UNDEFINED) {
            myEmergency = AnimationFactory.getGenericEmergencyAnimation();
        } else {
            myEmergency = AnimationFactory.getEmergencyAnimation(type, numberOfPeople);
View Full Code Here


    }

    public static GraphicableMenuBar newMenuBar() {
       
        GraphicableMenuBar graphMenuBar = new GraphicableMenuBar();
        Animation myMenuBar = AnimationFactory.getMenuBarAnimation();
       

        Polygon myMenuBarPolygon = new Polygon(new float[]{
                    0, 432,
                    640, 432,
View Full Code Here

   
    public static GraphicableEmergencyStatus newEmergencyStatus(EmergencyType type, int total){
        GraphicableEmergencyStatus emergencyStatus = new GraphicableEmergencyStatus();
     
       
        Animation myEmergencyStatus = AnimationFactory.getEmergencyStatusAnimation(type, total, total);
       
        Polygon myEmergencyStatusPolygon = new Polygon(new float[]{
                    0 + 30 , 432 + 10,
                    0 + 30 + 143, 432 + 10,
                    0 + 30 + 143, 432 + 10 + 28,
View Full Code Here

        final GraphicableVehicle vehicle = this.graphicableVehicles.get(vehicleId);
        if (vehicle == null){
            Logger.getLogger(ParticularEmergencyRenderer.class.getName()).log(Level.WARNING, "Unkown Vehicle {0}", vehicleId);
        }
       
        Animation fireTruckAnimation = AnimationFactory.getFireTruckGrayedAnimation().copy();
        fireTruckAnimation.setCurrentFrame(vehicle.getAnimation().getFrame());
        vehicle.setAnimation(fireTruckAnimation);
    }
View Full Code Here

        final GraphicableVehicle vehicle = this.graphicableVehicles.get(vehicleId);
        if (vehicle == null){
            Logger.getLogger(ParticularEmergencyRenderer.class.getName()).log(Level.WARNING, "Unkown Vehicle {0}", vehicleId);
        }
       
        Animation fireTruckAnimation = AnimationFactory.getFireTruckAnimation().copy();
        fireTruckAnimation.setCurrentFrame(vehicle.getAnimation().getFrame());
        vehicle.setAnimation(fireTruckAnimation);
       
    }
View Full Code Here

  @Override
  public void init(GameContainer arg0, StateBasedGame arg1) throws SlickException {
   
    SpriteSheet sheet = new SpriteSheet("data/corphish.png", 60, 60);
    Animation anim = new Animation(sheet, 300);
   
    players.add(new PlayerStatus("player1",anim, 30, 30));
   
    selfStatus = players.get(0);
  }
View Full Code Here

    // load beaver images to use in our animation
    Image beaver = new Image("data/bazooka4.png");
    Image beaver2 = new Image("data/bazooka5.png");
    Image[] frames = {beaver.getFlippedCopy(false, true).getScaledCopy(0.5f), beaver2.getFlippedCopy(false, true).getScaledCopy(0.5f)};
    Image[] frames2 = {beaver.getFlippedCopy(true, true).getScaledCopy(0.5f), beaver2.getFlippedCopy(true, true).getScaledCopy(0.5f)};
    team1Moving = new Animation(frames, 1000, false); // duration in ms
    team1MovingR = new Animation(frames2, 1000, false); // duration in ms
    Image beaver3 = new Image("data/darkBazooka4.png");
    Image beaver4 = new Image("data/darkBazooka5.png");
    Image[] frames3 = {beaver3.getFlippedCopy(false, true).getScaledCopy(0.5f), beaver4.getFlippedCopy(false, true).getScaledCopy(0.5f)};
    Image[] frames4 = {beaver3.getFlippedCopy(true, true).getScaledCopy(0.5f), beaver4.getFlippedCopy(true, true).getScaledCopy(0.5f)};
    team2Moving = new Animation(frames3, 1000, false); // duration in ms
    team2MovingR = new Animation(frames4, 1000, false); // duration in ms
   
    // add the mouse listener
    gc.getInput().addMouseListener(this);
   
    //add two items to the world
View Full Code Here

    // load beaver images to use in our animation
    Image beaver = new Image("data/bazooka4.png");
    Image beaver2 = new Image("data/bazooka5.png");
    Image[] frames = {beaver.getFlippedCopy(false, true).getScaledCopy(0.5f), beaver2.getFlippedCopy(false, true).getScaledCopy(0.5f)};
    Image[] frames2 = {beaver.getFlippedCopy(true, true).getScaledCopy(0.5f), beaver2.getFlippedCopy(true, true).getScaledCopy(0.5f)};
    team1Moving = new Animation(frames, 1000, false); // duration in ms
    team1MovingR = new Animation(frames2, 1000, false); // duration in ms
    Image beaver3 = new Image("data/darkBazooka4.png");
    Image beaver4 = new Image("data/darkBazooka5.png");
    Image[] frames3 = {beaver3.getFlippedCopy(false, true).getScaledCopy(0.5f), beaver4.getFlippedCopy(false, true).getScaledCopy(0.5f)};
    Image[] frames4 = {beaver3.getFlippedCopy(true, true).getScaledCopy(0.5f), beaver4.getFlippedCopy(true, true).getScaledCopy(0.5f)};
    team2Moving = new Animation(frames3, 1000, false); // duration in ms
    team2MovingR = new Animation(frames4, 1000, false); // duration in ms
   
    // add the mouse listener
    gc.getInput().addMouseListener(this);
   
    //add two items to the world
View Full Code Here

     * @param startNumFramAnimazione - colonna da cui si parte per leggere l'animazione (da 0)
     * @param numFramAnimazione - numero di colonna da cui leggere l'animazione
     * @return
     */
    private Animation setAnimationFromSheet(SpriteSheet sheet , int rigaSheet, int startNumFramAnimazione, int numFramAnimazione){
      Animation animation = new Animation();
        for (int frame=startNumFramAnimazione;frame<numFramAnimazione;frame++) {
          animation.addFrame(sheet.getSprite(frame,rigaSheet), 150);
        }
        animation.setAutoUpdate(false);
        return animation;
    }
View Full Code Here

     * @param startNumFramAnimazione - colonna da cui si parte per leggere l'animazione (da 0)
     * @param numFramAnimazione - numero di colonna da cui leggere l'animazione
     * @return
     */
    private Animation setAnimationFromSheet(SpriteSheet sheet , int rigaSheet, int startNumFramAnimazione, int numFramAnimazione){
      Animation animation = new Animation();
        for (int frame=startNumFramAnimazione;frame<numFramAnimazione;frame++) {
          animation.addFrame(sheet.getSprite(frame,rigaSheet), 150);
        }
        animation.setAutoUpdate(false);
        return animation;
    }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.Animation

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.