ObjectInstance.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package audio;
  2. import control.button.Button;
  3. import control.button.ButtonHandler;
  4. public class ObjectInstance {
  5. private long time;
  6. private int direction;
  7. private int buttonID;
  8. private Button button;
  9. private boolean hold;
  10. private long length;
  11. public ObjectInstance()
  12. {
  13. time = 0;
  14. direction = 0;
  15. buttonID = 0;
  16. button = null;
  17. hold = false;
  18. length = 0;
  19. }
  20. public long getTime() {
  21. return time;
  22. }
  23. public void setTime(long time) {
  24. this.time = time;
  25. }
  26. public int getDirection() {
  27. return direction;
  28. }
  29. public void setDirection(int direction) {
  30. this.direction = direction;
  31. }
  32. public int getButtonID() {
  33. return buttonID;
  34. }
  35. public void setButtonID(int buttonID) {
  36. if(buttonID < ButtonHandler.getButtons().size() - 1)
  37. {
  38. this.buttonID = buttonID;
  39. this.button = ButtonHandler.getButton(buttonID);
  40. }
  41. }
  42. public Button getButton() {
  43. return button;
  44. }
  45. public boolean isHold() {
  46. return hold;
  47. }
  48. public void setHold(boolean hold) {
  49. this.hold = hold;
  50. }
  51. public long getLength() {
  52. return length;
  53. }
  54. public void setLength(long length) {
  55. this.length = length;
  56. }
  57. }