refactor speed, invulnerability; refactor move to use Vec2
This commit is contained in:
4
types.h
4
types.h
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user