EntityAnimator.java 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package me.hammerle.supersnuvi.entity.components.animator;
  2. import me.hammerle.supersnuvi.entity.Entity;
  3. import me.hammerle.supersnuvi.entity.components.Health;
  4. import me.hammerle.supersnuvi.javafx.Image;
  5. public class EntityAnimator
  6. {
  7. public final static EntityAnimator NULL = new EntityAnimator(null, 0.0, 0.0);
  8. protected final Entity ent;
  9. private final double offsetX;
  10. private final double offsetY;
  11. protected EntityAnimator(Entity ent, double offsetX, double offsetY)
  12. {
  13. this.ent = ent;
  14. this.offsetX = offsetX;
  15. this.offsetY = offsetY;
  16. }
  17. public void tick()
  18. {
  19. }
  20. public Image getImage()
  21. {
  22. return null;
  23. }
  24. public boolean drawImageFlipped()
  25. {
  26. return false;
  27. }
  28. public final double getRenderX()
  29. {
  30. return ent.getX() + offsetX;
  31. }
  32. public final double getRenderY()
  33. {
  34. return ent.getY() + ent.getHeight() + offsetY;
  35. }
  36. public void bindSlot()
  37. {
  38. }
  39. }