Files
ld58/code/game/npc.h
James Bulman 2c67896cf2 Made navmesh compile on Windows
Small updates to remove warnings
Testing nonuniform descriptor access in shader
2025-10-05 01:31:39 +01:00

32 lines
587 B
C

#if !defined(LD_GAME_NPC_H_)
#define LD_GAME_NPC_H_
#include "aabb.h"
#include "nav.h"
#include "../core/types.h"
#define NPC_SPEED 0.2f
typedef enum NPC_ACTION NPC_ACTION;
enum NPC_ACTION {
// Waiting can be at any point of interest
NPC_ACTION_WAITING,
// Walking is when they are actively moving somewhere
NPC_ACTION_WALKING,
};
typedef struct NPC NPC;
struct NPC {
AABB collision;
Str8 name;
NPC_ACTION mode;
F32 waitTime;
F32 maxWaitTime;
NavPath path;
U32 currentNavNode;
U32 pathIndex;
U32 targetNavNode;
F32 walkTimer;
};
#endif // LD_GAME_NPC_H_