Added world loading and other various improvements
This commit is contained in:
+24
@@ -3,11 +3,35 @@
|
||||
#include "Player.h"
|
||||
#include <GL/freeglut.h>
|
||||
|
||||
Player* Player::instance = NULL;
|
||||
|
||||
Player::Player()
|
||||
{
|
||||
speed = 10;
|
||||
}
|
||||
|
||||
Player* Player::getInstance()
|
||||
{
|
||||
if (instance == nullptr)
|
||||
instance = new Player();
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
void Player::init()
|
||||
{
|
||||
instance = new Player();
|
||||
}
|
||||
|
||||
Player::~Player()
|
||||
{
|
||||
if (leftWeapon)
|
||||
delete leftWeapon;
|
||||
|
||||
if (rightWeapon)
|
||||
delete rightWeapon;
|
||||
}
|
||||
|
||||
void Player::setCamera()
|
||||
{
|
||||
glRotatef(rotation.x, 1, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user