mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
refactor: add GUI instance reference to UI nodes
This commit is contained in:
parent
74a94f869c
commit
4c48afbb90
70 changed files with 1133 additions and 832 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include "objects/Player.hpp"
|
||||
#include "util/Clock.hpp"
|
||||
|
||||
class Input;
|
||||
class Engine;
|
||||
class Camera;
|
||||
class Level;
|
||||
|
|
@ -54,11 +55,11 @@ class PlayerController {
|
|||
BlocksController& blocksController;
|
||||
float interactionTimer = 0.0f;
|
||||
|
||||
void updateKeyboard();
|
||||
void updateKeyboard(const Input& inputEvents);
|
||||
void resetKeyboard();
|
||||
void updatePlayer(float delta);
|
||||
void updateEntityInteraction(entityid_t eid, bool lclick, bool rclick);
|
||||
void updateInteraction(float delta);
|
||||
void updateInteraction(const Input& inputEvents, float delta);
|
||||
|
||||
float stepsTimer = 0.0f;
|
||||
void onFootstep(const Hitbox& hitbox);
|
||||
|
|
@ -76,13 +77,13 @@ public:
|
|||
|
||||
/// @brief Called after blocks update if not paused
|
||||
/// @param delta delta time
|
||||
/// @param input process user input
|
||||
void update(float delta, bool input);
|
||||
/// @param inputEvents nullable window inputs
|
||||
void update(float delta, const Input* inputEvents);
|
||||
|
||||
/// @brief Called after whole level update
|
||||
/// @param delta delta time
|
||||
/// @param input process user input
|
||||
/// @param inputEvents nullable window inputs
|
||||
/// @param pause is game paused
|
||||
void postUpdate(float delta, bool input, bool pause);
|
||||
void postUpdate(float delta, const Input* inputEvents, bool pause);
|
||||
Player* getPlayer();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue