Original Post
Hey, I am trying to work out an entity system for my engine. I created a base class CEntity which all other entities would be derived from.
//Base entity class
class CEntity
{
public:
char *name;//entities name
virtual void UpdateEntState();// This will usually be overridden by the derived class
void LoadModel(char *modelname);//load the model
bool drawable;//entity can be drawn to screen
vec3_t position;
vec3_t facing;
CEntity *next;//next entity
//model
private:
};
I figured the best way to store them was in a linked list so I could just go throught the list updating as necessary. My questions are should the linked list be made from CEntity and if I do will I be able to call UpdateEntState() in the derived class. Thanks.
InFerN0
Not all who wander are lost...