mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
add interacton by long press
This commit is contained in:
parent
316de42cca
commit
ee8d0368bd
5 changed files with 27 additions and 18 deletions
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "objects/Player.hpp"
|
||||
|
||||
class Engine;
|
||||
class Camera;
|
||||
class Level;
|
||||
class Block;
|
||||
|
|
@ -45,12 +46,14 @@ public:
|
|||
};
|
||||
|
||||
class PlayerController {
|
||||
Engine* engine;
|
||||
Level* level;
|
||||
std::shared_ptr<Player> player;
|
||||
PlayerInput input {};
|
||||
CameraControl camControl;
|
||||
BlocksController* blocksController;
|
||||
|
||||
float interactionTimer = 0.0f;
|
||||
void updateKeyboard();
|
||||
void resetKeyboard();
|
||||
void updatePlayer(float delta);
|
||||
|
|
@ -65,9 +68,7 @@ class PlayerController {
|
|||
voxel* updateSelection(float maxDistance);
|
||||
public:
|
||||
PlayerController(
|
||||
Level* level,
|
||||
const EngineSettings& settings,
|
||||
BlocksController* blocksController
|
||||
Engine* const engine, Level* level, BlocksController* blocksController
|
||||
);
|
||||
void update(float delta, bool input, bool pause);
|
||||
void postUpdate(float delta, bool input, bool pause);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue