Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Window;
- import org.newdawn.slick.opengl.Texture;
- import static Functions.renderer.*;
- import Window.TileType;
- public class Tile {
- private float x, y, width, height;
- private Texture texture;
- private TileType type;
- public Tile(float x, float y, float width, float height, TileType tile){
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- this.texture = quickLoad(tile.textureName);
- this.type = tile;
- }
- public void draw(){
- drawQuadTex(texture, x, y, width, height);
- }
- public float getX() {
- return x;
- }
- public void setX(float x) {
- this.x = x;
- }
- public float getY() {
- return y;
- }
- public void setY(float y) {
- this.y = y;
- }
- public float getWidth() {
- return width;
- }
- public void setWidth(float width) {
- this.width = width;
- }
- public float getHeight() {
- return height;
- }
- public void setHeight(float height) {
- this.height = height;
- }
- public Texture getTexture() {
- return texture;
- }
- public void setTexture(Texture texture) {
- this.texture = texture;
- }
- public TileType getType() {
- return type;
- }
- public void setType(TileType type) {
- this.type = type;
- }
- }
Add Comment
Please, Sign In to add comment