PlayerController.h indent fix
This commit is contained in:
@@ -32,11 +32,11 @@ const float CROUCH_SHIFT_Y = -0.2f;
|
||||
|
||||
|
||||
CameraControl::CameraControl(std::shared_ptr<Player> player, const CameraSettings& settings)
|
||||
: player(player),
|
||||
camera(player->camera),
|
||||
currentViewCamera(player->currentCamera),
|
||||
settings(settings),
|
||||
offset(0.0f, 0.7f, 0.0f) {
|
||||
: player(player),
|
||||
camera(player->camera),
|
||||
currentViewCamera(player->currentCamera),
|
||||
settings(settings),
|
||||
offset(0.0f, 0.7f, 0.0f) {
|
||||
}
|
||||
|
||||
void CameraControl::refresh() {
|
||||
|
||||
@@ -12,43 +12,43 @@ class Level;
|
||||
class BlocksController;
|
||||
|
||||
class CameraControl {
|
||||
std::shared_ptr<Player> player;
|
||||
std::shared_ptr<Camera> camera, currentViewCamera;
|
||||
const CameraSettings& settings;
|
||||
glm::vec3 offset;
|
||||
float shake = 0.0f;
|
||||
float shakeTimer = 0.0f;
|
||||
glm::vec3 interpVel {0.0f};
|
||||
std::shared_ptr<Player> player;
|
||||
std::shared_ptr<Camera> camera, currentViewCamera;
|
||||
const CameraSettings& settings;
|
||||
glm::vec3 offset;
|
||||
float shake = 0.0f;
|
||||
float shakeTimer = 0.0f;
|
||||
glm::vec3 interpVel {0.0f};
|
||||
public:
|
||||
CameraControl(std::shared_ptr<Player> player, const CameraSettings& settings);
|
||||
void updateMouse(PlayerInput& input);
|
||||
void update(PlayerInput& input, float delta, Chunks* chunks);
|
||||
void refresh();
|
||||
CameraControl(std::shared_ptr<Player> player, const CameraSettings& settings);
|
||||
void updateMouse(PlayerInput& input);
|
||||
void update(PlayerInput& input, float delta, Chunks* chunks);
|
||||
void refresh();
|
||||
};
|
||||
|
||||
class PlayerController {
|
||||
Level* level;
|
||||
std::shared_ptr<Player> player;
|
||||
PlayerInput input;
|
||||
CameraControl camControl;
|
||||
Level* level;
|
||||
std::shared_ptr<Player> player;
|
||||
PlayerInput input;
|
||||
CameraControl camControl;
|
||||
BlocksController* blocksController;
|
||||
|
||||
void updateKeyboard();
|
||||
void updateCamera(float delta, bool movement);
|
||||
void resetKeyboard();
|
||||
void updateControls(float delta);
|
||||
void updateInteraction();
|
||||
void updateKeyboard();
|
||||
void updateCamera(float delta, bool movement);
|
||||
void resetKeyboard();
|
||||
void updateControls(float delta);
|
||||
void updateInteraction();
|
||||
public:
|
||||
static glm::vec3 selectedBlockPosition;
|
||||
static glm::ivec3 selectedBlockNormal;
|
||||
static glm::vec3 selectedPointPosition;
|
||||
static int selectedBlockId;
|
||||
static int selectedBlockStates;
|
||||
static glm::vec3 selectedBlockPosition;
|
||||
static glm::ivec3 selectedBlockNormal;
|
||||
static glm::vec3 selectedPointPosition;
|
||||
static int selectedBlockId;
|
||||
static int selectedBlockStates;
|
||||
|
||||
PlayerController(Level* level,
|
||||
PlayerController(Level* level,
|
||||
const EngineSettings& settings,
|
||||
BlocksController* blocksController);
|
||||
void update(float delta, bool input, bool pause);
|
||||
void update(float delta, bool input, bool pause);
|
||||
|
||||
Player* getPlayer();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user