package uk.co.beercave.gunboat.entities;

import uk.co.beercave.gunboat.ResourceManager;
import uk.co.beercave.gunboat.renderers.SeaRenderer;
import uk.co.beercave.gunboat.renderers.SeaRenderer.Renderable;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Pool.Poolable;

public class Bullet extends GameObject  implements Poolable{
	private static Array<Color> boatColors;
	public float dx = 0;
	private static Color color = new Color(.8f, .8f, 0, .8f);
	public Renderable sprite;
	public float prevz;
	public Bullet(){
		
		
	}
	public void init() {
//		Gdx.app.log("BULLET", "initialising");
		alive = true;
		prevz = -1;
		sprite = SeaRenderer.newFrontSprite();
		sprite.tx = ResourceManager.blankTx;
		sprite.color = color;
		sprite.parent = this;
	}

	@Override
	public void reset() {
//		Gdx.app.log("BULLET", "Releasing sprite");
		SeaRenderer.releaseFrontSprite(sprite);
	}
}
