Entity.h 399 B

1234567891011121314151617181920212223
  1. #ifndef ENTITY_H
  2. #define ENTITY_H
  3. #include "gaming-core/math/Vector.h"
  4. struct Entity {
  5. Vector2 lastPosition;
  6. Vector2 position;
  7. Vector2 size;
  8. Vector2 velocity;
  9. Vector2 acceleration;
  10. Vector2 force;
  11. float inverseMass;
  12. bool onGround;
  13. Entity(const Vector2& size, float mass);
  14. void addForce(const Vector2& force);
  15. void preTick();
  16. void tick();
  17. };
  18. #endif