refactor tear properties into Player

This commit is contained in:
2025-12-01 12:41:07 -05:00
parent ee5cb71560
commit 6a6249798e
3 changed files with 50 additions and 53 deletions

10
types.h
View File

@@ -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);