player health

This commit is contained in:
2025-10-06 17:45:58 +01:00
parent fcc7adfb22
commit d54b4df4c2
4 changed files with 7 additions and 1 deletions

View File

@@ -53,6 +53,10 @@ void PlayerInput(SDL_Event *event, Player *player)
void PlayerUpdate(F32 delta, Player *player) {
player->controls.shot = false;
V2f dir = V2F(0, 0);
if(player->health == 0){
printf("dead :(");
player->health = 3;
}
if(player->controls.upDown) {
dir.y -= 1;
}