package bullithell.objects.missiles;

import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;

import bullithell.images.Images;

public class BombMissile extends Missile{
	BufferedImage background;
	
	public BombMissile(int x, int y, String type){
		setBorder(new Rectangle(x,y,Images.bomb.getWidth(), Images.bomb.getHeight()));
		background = Images.bomb;
		setExplodable(true);
		this.type = Missile.Missiletype.BOMB;
		switch(type){
		case "slow":
			setYspeed(1);
			setXspeed(0);
			break;
		}
	}
	public void draw(Graphics2D g2) {
		g2.drawImage(background, (int)getBorder().getX(), (int)getBorder().getY(), (int)getBorder().getWidth(), (int)getBorder().getHeight(),null);
		super.draw(g2);
	}
	public void recalculate() {
		super.recalculate();
	}
}
