package ludumdare.game;


import org.crusty.math.Vec2double;

public class PieceOfRocket extends Entity {

	//Sprite[] sprites = new Sprite[4];
	public boolean activated = true;
	public boolean bottom = false;
	
	public PieceOfRocket(String str) {
		super(SpriteManager.getSprite(str));
		
//		this.pos.x = 200;
//		this.pos.y = 280;
	}
	
	public void logic(double dt) {
		
		super.logic(dt);
		
		if (activated && bottom) { 
//			this.acc.y = -0.1;
//			if (this.acc.y > -0.1) {
//				this.acc.y -= 0.01;
//			System.out.println("a");
//			}
			Vec2double firePos = new Vec2double(pos.x + 40, pos.y + 190);
			ParticleManager.addParticle(3, SpriteManager.getSprite("fire.png"), firePos, "rocketFire");
			
		}
	}
	
//	public void draw(Graphics2D g) {
//		g.drawImage(sprite.image, 
//					(int) pos.x, 
//					(int) pos.y, 
//					null);
//	}
	
}
