Guest User

Untitled

a guest
Apr 13th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. package Window;
  2.  
  3. import org.newdawn.slick.opengl.Texture;
  4.  
  5. import static Functions.renderer.*;
  6.  
  7. import Window.TileType;
  8.  
  9. public class Tile {
  10.  
  11. private float x, y, width, height;
  12. private Texture texture;
  13. private TileType type;
  14.  
  15. public Tile(float x, float y, float width, float height, TileType tile){
  16. this.x = x;
  17. this.y = y;
  18. this.width = width;
  19. this.height = height;
  20. this.texture = quickLoad(tile.textureName);
  21. this.type = tile;
  22. }
  23.  
  24. public void draw(){
  25. drawQuadTex(texture, x, y, width, height);
  26. }
  27.  
  28.  
  29. public float getX() {
  30. return x;
  31. }
  32.  
  33. public void setX(float x) {
  34. this.x = x;
  35. }
  36.  
  37. public float getY() {
  38. return y;
  39. }
  40.  
  41. public void setY(float y) {
  42. this.y = y;
  43. }
  44.  
  45. public float getWidth() {
  46. return width;
  47. }
  48.  
  49. public void setWidth(float width) {
  50. this.width = width;
  51. }
  52.  
  53. public float getHeight() {
  54. return height;
  55. }
  56.  
  57. public void setHeight(float height) {
  58. this.height = height;
  59. }
  60.  
  61. public Texture getTexture() {
  62. return texture;
  63. }
  64.  
  65. public void setTexture(Texture texture) {
  66. this.texture = texture;
  67. }
  68.  
  69. public TileType getType() {
  70. return type;
  71. }
  72.  
  73. public void setType(TileType type) {
  74. this.type = type;
  75. }
  76.  
  77.  
  78.  
  79. }
Add Comment
Please, Sign In to add comment