A 2D tile-based sandbox game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Player.h 326B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include "common.h"
  3. #include "Body.h"
  4. namespace Swan {
  5. class Player {
  6. public:
  7. Player(Vec2 pos):
  8. body_(pos, size, mass) {}
  9. void draw(Win &win);
  10. void update(float dt);
  11. private:
  12. static const float force;
  13. static const float friction;
  14. static const float mass;
  15. static const Vec2 size;
  16. Body body_;
  17. };
  18. }