feat: different rooms added

feat: shooting bandit added
This commit is contained in:
2025-10-05 23:36:50 +01:00
parent 319bb441ed
commit 64a84e3a8d
7 changed files with 37 additions and 16 deletions

View File

@@ -2,6 +2,14 @@
#include "game/bandit.h"
void UpdateBandit(F32 delta, Bandit *bandit, World *world) {
if(
world->player.controls.shot
&& AABB_Point(bandit->collision, world->player.shotPos)
&& bandit->currentArea == world->player.currentArea
) {
printf("You shot the bandit %*.s\n", Sv(bandit->name));
bandit->health--;
}
switch (bandit->mode) {
case BANDIT_WAITING:
bandit->waitTime+=delta;