#ifndef __PLAYERSHIP_H__ #define __PLAYERSHIP_H__ #include "spaceship.h" #include "texturemap.h" #include //! convenience definition for the Player singleton #define thePlayer PlayerShip::getInstance() class PlayerShip : public Spaceship { public: PlayerShip(); ~PlayerShip() {} void Render(); void UpdateState(float timeElapsed, bool roll); void Hit(float damage); void ResetOrientation(); //! returns a handle to the singleton instance of Player (use "thePlayer") static PlayerShip& getInstance() { if (!s_pPlayer) { s_pPlayer = new PlayerShip(); } return *s_pPlayer; }; private: //! singleton instance static PlayerShip *s_pPlayer; TextureMap _scope; TextureMap _cockpit; float _flashcount; bool _flash; }; #endif