/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package items;

import org.newdawn.slick.Animation;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;

/**
 *
 * @author mirek
 */
public class Star {
    private int x;
    private int y;
    private Animation animation;
    
    public Star() throws SlickException{
        this.x = 100;
        this.y = 10;
        
        Image[] images = {new Image("resources/animation_images/items/star1.png"),
            new Image("resources/animation_images/items/star2.png"),
            new Image("resources/animation_images/items/star3.png"),
            new Image("resources/animation_images/items/star4.png"),
            new Image("resources/animation_images/items/star5.png"),
            new Image("resources/animation_images/items/star6.png"),
            new Image("resources/animation_images/items/star7.png"),
            new Image("resources/animation_images/items/star8.png")
        };
        
        this.animation = new Animation(images, 50, true);
    }

    public void render(GameContainer container, Graphics g, Object object) {
        this.animation.draw(this.x, this.y);
    }
    
    public Animation getCurrentAnimation(){
        return this.animation;
    }
    
    public int getX(){
        return this.x;
    }
    
    public int getY(){
        return this.y;
    }
    
}
