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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user