get player out of main. player is now a singelton?(not sure of singleton is good inplemented). Added player singleton in worldstate

This commit is contained in:
Remco
2016-05-19 11:27:32 +02:00
parent 876ec56780
commit a38a6d3c5f
9 changed files with 117 additions and 46 deletions
+11 -1
View File
@@ -5,7 +5,6 @@
class Player
{
public:
Player();
~Player();
struct Eyes
@@ -18,11 +17,22 @@ public:
} eyes;
void Display(void);
//static Player* GetInstance(void);
static Player& GetInstance(void);
void PlayerMoveEyes(const float angle, const float fac, const bool heigth);
void PlayerRotateEyes(const int dx, const int dy);
private:
int level;
int xp;
Weapon* right = nullptr;
Weapon* left = nullptr;
vector<Weapon> weapons;
Player();
Player(Player const&);
void operator=(Player const&);
//static Player* player;
};