mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
Controllers minor refactor
This commit is contained in:
parent
c0050cffaa
commit
856f5879f1
4 changed files with 28 additions and 22 deletions
|
|
@ -7,7 +7,6 @@
|
|||
#include "../objects/Player.h"
|
||||
|
||||
class Camera;
|
||||
class Player;
|
||||
class Level;
|
||||
|
||||
class CameraControl {
|
||||
|
|
@ -30,17 +29,20 @@ class PlayerController {
|
|||
Player* player;
|
||||
PlayerInput input;
|
||||
CameraControl camControl;
|
||||
public:
|
||||
static glm::vec3 selectedBlockPosition;
|
||||
static int selectedBlockId;
|
||||
|
||||
PlayerController(Level* level, const EngineSettings& settings);
|
||||
void updateKeyboard();
|
||||
void updateCamera(float delta, bool movement);
|
||||
void refreshCamera();
|
||||
void resetKeyboard();
|
||||
void updateControls(float delta);
|
||||
void updateInteraction();
|
||||
|
||||
public:
|
||||
static glm::vec3 selectedBlockPosition;
|
||||
static int selectedBlockId;
|
||||
|
||||
PlayerController(Level* level, const EngineSettings& settings);
|
||||
void update(float delta, bool input, bool pause);
|
||||
};
|
||||
|
||||
#endif /* PLAYER_CONTROL_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue