Advertisement
Guest User

MC(Alien) Class

a guest
May 23rd, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. public class MC
  2. {
  3. private int x, y, hp, cHP, inv, fw, open;
  4. private Weapon current, secondary;
  5. public MC()
  6. {
  7. x = 10;
  8. y = 10;
  9. hp = 10;
  10. cHP = hp;
  11. inv = 10;
  12. fw = 1;
  13. open = 8;
  14. current = new Weapon(100,2,2,3,"clank",0);
  15. secondary = new Weapon();
  16. }
  17. public MC(int ex, int why, int eichpee, int invntry, int whatIsThisEvenIForgotButItIsSomehowSignificant, int openMid, Weapon bork, Weapon shiv)
  18. {
  19. x = ex;
  20. y = why;
  21. hp = eichpee;
  22. cHP = hp;
  23. fw = whatIsThisEvenIForgotButItIsSomehowSignificant;
  24. open = openMid;
  25. current = bork;
  26. secondary = shiv;
  27. }
  28. //accessor methods
  29. public int getX()
  30. {
  31. return x;
  32. }
  33. public int getY()
  34. {
  35. return y;
  36. }
  37. public int getHP()
  38. {
  39. return hp;
  40. }
  41. public Weapon getWeapon()
  42. {
  43. return current;
  44. }
  45. public Weapon getSecondary()
  46. {
  47. return secondary;
  48. }
  49. public int getOpen()
  50. {
  51. return open;
  52. }
  53. //editor methods
  54. public void setX(int a)
  55. {
  56. x = a;
  57. }
  58. public void setY(int a)
  59. {
  60. y = a;
  61. }
  62. public void setHP(int a)
  63. {
  64. hp = a;
  65. }
  66. public void setWeapon(Weapon a)
  67. {
  68. current = a;
  69. }
  70. public void setSecondary(Weapon a)
  71. {
  72. secondary = a;
  73. }
  74. public void setOpen(int a)
  75. {
  76. open = a;
  77. }
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement