game.h 442 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "engine/engine.h"
  3. #include <game/world.h>
  4. #include "flip_world.h"
  5. typedef struct
  6. {
  7. uint32_t score;
  8. } GameContext;
  9. typedef struct
  10. {
  11. Vector trajectory; // Direction player would like to move.
  12. float radius; // collision radius
  13. int8_t dx; // x direction
  14. int8_t dy; // y direction
  15. Sprite *sprite; // player sprite
  16. } PlayerContext;
  17. extern const EntityDescription player_desc;