Movement.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package me.hammerle.supersnuvi.entity.components;
  2. import me.hammerle.supersnuvi.entity.Entity;
  3. public class Movement
  4. {
  5. public final static Movement NULL = new Movement(null);
  6. protected final Entity ent;
  7. public Movement(Entity ent)
  8. {
  9. this.ent = ent;
  10. }
  11. public float getVelocityX()
  12. {
  13. return 0.0f;
  14. }
  15. public float getVelocityY()
  16. {
  17. return 0.0f;
  18. }
  19. public boolean canMoveEverywhere()
  20. {
  21. return false;
  22. }
  23. //--------------------------------------------------------------------------
  24. // jumping
  25. //--------------------------------------------------------------------------
  26. public boolean jump()
  27. {
  28. return false;
  29. }
  30. public float getJumpPower()
  31. {
  32. return 0.0f;
  33. }
  34. //--------------------------------------------------------------------------
  35. // gravity
  36. //--------------------------------------------------------------------------
  37. public boolean hasGravity()
  38. {
  39. return false;
  40. }
  41. public float getGravityFactor()
  42. {
  43. return 1.0f;
  44. }
  45. //--------------------------------------------------------------------------
  46. // friction
  47. //--------------------------------------------------------------------------
  48. public void setInWater(boolean b)
  49. {
  50. }
  51. public boolean isInWater()
  52. {
  53. return false;
  54. }
  55. public void setFrictionFactor(float f)
  56. {
  57. }
  58. public float getFrictionFactor()
  59. {
  60. return 1.0f;
  61. }
  62. }