2021-09-19 15:44:31 +03:00
|
|
|
//
|
|
|
|
// Created by Иван Ильин on 19.09.2021.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef SHOOTER_PLAYERCONTROLLER_H
|
|
|
|
#define SHOOTER_PLAYERCONTROLLER_H
|
|
|
|
|
|
|
|
#include "Player.h"
|
2022-07-11 16:58:05 +03:00
|
|
|
#include "engine/io/Keyboard.h"
|
|
|
|
#include "engine/io/Mouse.h"
|
2021-09-19 15:44:31 +03:00
|
|
|
|
2021-10-12 20:18:56 +03:00
|
|
|
class PlayerController final {
|
2021-09-19 15:44:31 +03:00
|
|
|
private:
|
|
|
|
std::shared_ptr<Player> _player;
|
|
|
|
std::shared_ptr<Keyboard> _keyboard;
|
|
|
|
std::shared_ptr<Mouse> _mouse;
|
|
|
|
|
|
|
|
bool _inRunning = false;
|
2021-10-09 13:41:12 +03:00
|
|
|
bool _isSliding = false;
|
2021-09-19 15:44:31 +03:00
|
|
|
bool _isInSlowMo = false;
|
|
|
|
|
|
|
|
public:
|
2021-10-02 20:36:07 +03:00
|
|
|
PlayerController(std::shared_ptr<Player> player, std::shared_ptr<Keyboard> keyboard, std::shared_ptr<Mouse> mouse);
|
2021-10-31 11:39:08 +03:00
|
|
|
|
2021-09-19 15:44:31 +03:00
|
|
|
void update();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif //SHOOTER_PLAYERCONTROLLER_H
|