refactor speed, invulnerability; refactor move to use Vec2

This commit is contained in:
2025-12-01 12:51:42 -05:00
parent 6a6249798e
commit fdf30d0446
2 changed files with 24 additions and 25 deletions

View File

@@ -11,6 +11,8 @@
struct Player {
Rectangle rect;
uint8_t lives;
float speed;
float invulnerability_secs;
double last_hit;
float tear_speed;
float tear_range;
@@ -22,7 +24,7 @@ struct Player {
[[nodiscard]] bool is_invulnerable(double now) const noexcept;
void move(float delta_x, float delta_y);
void move(Vector2 delta);
};
enum Direction {