Allocate path with object pool for pathfinding
This commit is contained in:
@@ -62,10 +62,15 @@ typedef struct Animation {
|
||||
} Animation;
|
||||
extern ECS_COMPONENT_DECLARE(Animation);
|
||||
|
||||
#define PATH_DATA_SIZE 8
|
||||
typedef struct PathData {
|
||||
Position waypoints[PATH_DATA_SIZE];
|
||||
size_t numWaypoints;
|
||||
struct PathData *next;
|
||||
} PathData;
|
||||
|
||||
typedef struct Path {
|
||||
Position *waypoints;
|
||||
i32 maxWaypoints;
|
||||
i32 numWaypoints;
|
||||
PathData *paths;
|
||||
i32 curWaypoint;
|
||||
} Path;
|
||||
extern ECS_COMPONENT_DECLARE(Path);
|
||||
|
||||
Reference in New Issue
Block a user