/*! \file player.h \brief Implements a basic controllable WorldEntity */ #ifndef PLAYER_H #define PLAYER_H #include "world_entity.h" #include "object.h" #include //! Basic controllable WorldEntity class Player : public WorldEntity { friend class World; public: Player (bool isFree = false); ~Player (); virtual void post_spawn (); virtual void tick (float time); virtual void hit (WorldEntity* weapon, Vector loc); 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: bool bUp, bDown, bLeft, bRight, bAscend, bDescend; bool bFire; Vector velocity; float travel_speed; float acceleration; GLuint objectList; Object* obj; float tottime; float tottimecopy; float rottime; float angle; int numPressed; bool angleturn; bool movfinishright,movfinishleft,movfinishup,movfinishdown; void move (float time); }; #endif