feat: different rooms added
feat: shooting bandit added
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user