Guest User

Untitled

a guest
Jul 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. package com.rs.game;
  2.  
  3. import com.rs.cache.loaders.ObjectDefinitions;
  4.  
  5. @SuppressWarnings("serial")
  6. public class WorldObject extends WorldTile {
  7.  
  8. private int id;
  9. private int type;
  10. private int rotation;
  11. private int life;
  12.  
  13. public WorldObject(int id, int type, int rotation, int x, int y, int plane) {
  14. super(x, y, plane);
  15. this.id = id;
  16. this.type = type;
  17. this.rotation = rotation;
  18. this.life = 1;
  19. }
  20.  
  21. public WorldObject(int id, int type, int rotation, int x, int y, int plane, int life) {
  22. super(x, y, plane);
  23. this.id = id;
  24. this.type = type;
  25. this.rotation = rotation;
  26. this.life = life;
  27. }
  28.  
  29. public int getId() {
  30. return id;
  31. }
  32.  
  33. public int getType() {
  34. return type;
  35. }
  36.  
  37. public int getRotation() {
  38. return rotation;
  39. }
  40.  
  41. public void setRotation(int rotation) {
  42. this.rotation = rotation;
  43. }
  44.  
  45. public int getLife() {
  46. return life;
  47. }
  48.  
  49. public void setLife(int life) {
  50. this.life = life;
  51. }
  52.  
  53. public void decrementObjectLife() {
  54. this.life--;
  55. }
  56.  
  57. public ObjectDefinitions getDefinitions() {
  58. return ObjectDefinitions.getObjectDefinitions(id);
  59. }
  60. }
Add Comment
Please, Sign In to add comment