1) Create PlayerController
2) Split Screen.cpp into (Screen.cpp & Keyboard.cpp & Mouse.cpp)master
parent
7ff21fb9aa
commit
720b2e0ddd
|
@ -10,7 +10,6 @@ PlayerController::PlayerController(std::shared_ptr<Player> player,
|
||||||
std::shared_ptr<Mouse> mouse) : _player(player), _world(world), _keyboard(keyboard), _mouse(mouse) {
|
std::shared_ptr<Mouse> mouse) : _player(player), _world(world), _keyboard(keyboard), _mouse(mouse) {
|
||||||
_slowMoSound.setBuffer(*ResourceManager::loadSoundBuffer("../sound/slow_mo.ogg"));
|
_slowMoSound.setBuffer(*ResourceManager::loadSoundBuffer("../sound/slow_mo.ogg"));
|
||||||
_unSlowMoSound.setBuffer(*ResourceManager::loadSoundBuffer("../sound/unslow_mo.ogg"));
|
_unSlowMoSound.setBuffer(*ResourceManager::loadSoundBuffer("../sound/unslow_mo.ogg"));
|
||||||
_changeWeaponSound.setBuffer(*ResourceManager::loadSoundBuffer("../sound/weapons/change_weapon.ogg"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerController::update() {
|
void PlayerController::update() {
|
||||||
|
|
|
@ -25,7 +25,6 @@ private:
|
||||||
|
|
||||||
sf::Sound _slowMoSound;
|
sf::Sound _slowMoSound;
|
||||||
sf::Sound _unSlowMoSound;
|
sf::Sound _unSlowMoSound;
|
||||||
sf::Sound _changeWeaponSound;
|
|
||||||
sf::Sound _walkSound;
|
sf::Sound _walkSound;
|
||||||
|
|
||||||
double _jumpHeight = 3;
|
double _jumpHeight = 3;
|
||||||
|
|
|
@ -38,7 +38,6 @@ public:
|
||||||
Camera() = default;
|
Camera() = default;
|
||||||
Camera(const Camera& camera) = delete;
|
Camera(const Camera& camera) = delete;
|
||||||
|
|
||||||
|
|
||||||
void init(int width, int height, double fov = 110.0, double ZNear = 0.1, double ZFar = 5000.0);
|
void init(int width, int height, double fov = 110.0, double ZNear = 0.1, double ZFar = 5000.0);
|
||||||
|
|
||||||
std::vector<Triangle>& project(std::shared_ptr<Mesh> mesh);
|
std::vector<Triangle>& project(std::shared_ptr<Mesh> mesh);
|
||||||
|
|
|
@ -18,7 +18,6 @@ private:
|
||||||
bool _visible = true;
|
bool _visible = true;
|
||||||
|
|
||||||
Mesh& operator*=(const Matrix4x4& matrix4X4);
|
Mesh& operator*=(const Matrix4x4& matrix4X4);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Mesh() = default;
|
Mesh() = default;
|
||||||
Mesh(const Mesh& mesh);
|
Mesh(const Mesh& mesh);
|
||||||
|
|
Loading…
Reference in New Issue