added lives

This commit is contained in:
2025-11-30 20:13:49 -05:00
parent 275da1bd65
commit b77af66c9c
2 changed files with 39 additions and 17 deletions

View File

@@ -8,7 +8,11 @@
#include "raylib.h"
struct Player : Rectangle {
uint8_t lives;
double last_hit;
[[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);
};
@@ -34,6 +38,6 @@ struct Tear {
struct Enemy {
Vector2 center;
float radius;
Vector2 moving;
float speed;
bool alive;
};