/*! \file player.h \brief Implements a basic controllable WorldEntity */ #ifndef PLAYER_H #define PLAYER_H #include "world_entity.h" //! Basic controllable WorldEntity class Player : public WorldEntity { friend class World; public: Player (bool isFree = false); ~Player (); static bool is_a(char* name); virtual void post_spawn (); virtual void tick (float time); virtual void hit (Damage* dmg, WorldEntity* instigator, Uint32 hitflags); virtual void destroy (); virtual void collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags); virtual void command (Command* cmd); virtual void draw (); virtual void get_lookat (Location* locbuf); virtual void left_world (); private: static bool (*basefunc)(char*); static char *is; bool bUp, bDown, bLeft, bRight, bAscend, bDescend; bool bFire; Vector velocity; float travel_speed; float acceleration; void move (float time); }; #endif