package levelGen;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.math.Rectangle;
import com.ld52.agent.Agent;

public class LeftUI extends Sprite {// this is a very simple, non animated sprite.

	private TextureRegion main;
	private Texture t1;
	public Color color;
	public Rectangle rect;
	private int _sw;// sprite width
	private int _sh;// sprite height

	public LeftUI(float _x, float _y) {
		rect = new Rectangle();
		rect.x = (int) _x;
		rect.y = (int) _y;
		rect.width = 129;
		rect.height = 900;

		_sw = 129;
		_sh = 900;

		// still frames
		t1 = new Texture(Gdx.files.internal("player.png"));
		main = new TextureRegion(t1, (0 * _sw), (0 * _sh), _sw, _sh);
		color = Color.WHITE;
		setBounds(0, 0, _sw, _sh);
		setOriginCenter();
		setRegion(main);
	}

	public TextureRegion getTextureRegion() {
		return main;
	}

	public void render(Agent game, OrthographicCamera camera, float dt) {// hmmm i think it just needs placed before? it gets here.
		game.batch.setColor(color);
		game.batch.draw(getTextureRegion(), rect.x, rect.y);
	}

	public void dispose() {
	}
}
