You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

58 lines
1011 B

  1. package structures.basic;
  2. /**
  3. * This contains the positional information for a unit
  4. * that is sitting on a tile. tilex/y are the index position
  5. * of the tile the unit is sitting upon. x/ypos are the pixel
  6. * position of the unit.
  7. *
  8. * @author Dr. Richard McCreadie
  9. *
  10. */
  11. public class Position {
  12. int xpos;
  13. int ypos;
  14. int tilex;
  15. int tiley;
  16. public Position() {}
  17. public Position(int xpos, int ypos, int tilex, int tilexy) {
  18. super();
  19. this.xpos = xpos;
  20. this.ypos = ypos;
  21. this.tilex = tilex;
  22. this.tiley = tilexy;
  23. }
  24. public int getXpos() {
  25. return xpos;
  26. }
  27. public void setXpos(int xpos) {
  28. this.xpos = xpos;
  29. }
  30. public int getYpos() {
  31. return ypos;
  32. }
  33. public void setYpos(int ypos) {
  34. this.ypos = ypos;
  35. }
  36. public int getTilex() {
  37. return tilex;
  38. }
  39. public void setTilex(int tilex) {
  40. this.tilex = tilex;
  41. }
  42. public int getTiley() {
  43. return tiley;
  44. }
  45. public void setTiley(int tilexy) {
  46. this.tiley = tilexy;
  47. }
  48. }