feat: Added portals

This commit is contained in:
2025-10-06 21:07:55 +01:00
parent be49003a8d
commit 680d375b8c
9 changed files with 158 additions and 33 deletions

View File

@@ -4,6 +4,11 @@
#include "core/math.h"
void UpdateNPC(F32 delta, NPC *npc, World *world) {
for(int i = 0; i < world->portalCount; i++) {
if(AABB_Collide(world->portals[0].box, npc->collision)) {
npc->currentArea = world->portals[0].area;
}
}
switch (npc->mode) {
case NPC_ACTION_WAITING:
npc->waitTime+=delta;