refactor tear properties into Player
This commit is contained in:
10
types.h
10
types.h
@@ -8,14 +8,18 @@
|
||||
|
||||
#include "raylib.h"
|
||||
|
||||
struct Player : Rectangle {
|
||||
struct Player {
|
||||
Rectangle rect;
|
||||
uint8_t lives;
|
||||
double last_hit;
|
||||
float tear_speed;
|
||||
float tear_range;
|
||||
float tear_radius;
|
||||
double last_fired;
|
||||
double fire_rate;
|
||||
|
||||
[[nodiscard]] Vector2 center() const noexcept;
|
||||
|
||||
[[nodiscard]] Rectangle rect() const noexcept;
|
||||
|
||||
[[nodiscard]] bool is_invulnerable(double now) const noexcept;
|
||||
|
||||
void move(float delta_x, float delta_y);
|
||||
|
||||
Reference in New Issue
Block a user