#ifndef ENTITY_H #define ENTITY_H #include "Phys.h" #include "Vector.h" #include "Animation.h" #define E_LOGIC_WANDER 0 struct Entity { struct Phys phys; struct Phys l_phys; struct Vector *home; struct Vector home_offset; struct Vector *target; struct Vector target_offset; struct Animation animation; int logic; // logic of the AI - 0 - dumb/wander int type; float speed; float turn_rate; int hp; int max_hp; float sight; float range; int attack; // melee, etc. int damage; struct EntityData *spawn_data; char *name; int exp; int time; // despawn time int move_id; int idle_id; int curr_id; int height; // hmm, where image Y offset is int mode; }; #define E_FIND_PLAYER 0 #define E_MOVE_PLAYER 1 #define E_ATTACK_PLAYER 2 struct Entity *newEntity(); int freeEntity(struct Entity *entity); #endif