mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 12:31:51 +00:00
memory related refactor
This commit is contained in:
parent
8054d4ba55
commit
017c8722ae
25 changed files with 336 additions and 320 deletions
|
|
@ -1,14 +1,14 @@
|
|||
#ifndef PLAYER_CONTROL_HPP_
|
||||
#define PLAYER_CONTROL_HPP_
|
||||
|
||||
#include "../settings.hpp"
|
||||
#include "../objects/Player.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
#include "../settings.hpp"
|
||||
#include "../objects/Player.hpp"
|
||||
|
||||
class Camera;
|
||||
class Level;
|
||||
class Block;
|
||||
|
|
@ -38,7 +38,7 @@ class CameraControl {
|
|||
public:
|
||||
CameraControl(std::shared_ptr<Player> player, const CameraSettings& settings);
|
||||
void updateMouse(PlayerInput& input);
|
||||
void update(PlayerInput& input, float delta, Chunks* chunks);
|
||||
void update(const PlayerInput& input, float delta, Chunks* chunks);
|
||||
void refresh();
|
||||
};
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ using on_block_interaction = std::function<void(
|
|||
class PlayerController {
|
||||
Level* level;
|
||||
std::shared_ptr<Player> player;
|
||||
PlayerInput input;
|
||||
PlayerInput input {};
|
||||
CameraControl camControl;
|
||||
BlocksController* blocksController;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue