This commit is contained in:
Charles 2001-01-16 21:40:14 +00:00
parent 2ca7da9ba7
commit dc9561dc93
2 changed files with 91 additions and 0 deletions

46
source/enemy/npcpath.h Normal file
View file

@ -0,0 +1,46 @@
/*=========================================================================
npcpath.h
Author: CRB
Created:
Project: Spongebob
Purpose:
Copyright (c) 2000 Climax Development Ltd
===========================================================================*/
class CNpcWaypoint
{
public:
DVECTOR pos;
bool isPointNear( DVECTOR testPos );
};
enum NPC_PATH_TYPE
{
SINGLE_USE_PATH = 0,
REPEATING_PATH = 1,
PONG_PATH = 2,
};
class CNpcPath
{
enum
{
NPC_MAX_WAYPOINTS = 4,
};
private:
CNpcWaypoint waypoint[NPC_MAX_WAYPOINTS];
NPC_PATH_TYPE pathType;
u8 currentWaypoint;
u8 waypointCount;
public:
void addWaypoint( DVECTOR newPos );
void setPathType( NPC_PATH_TYPE newPathType );
bool incPath();
};