10#include "input/KeyboardKey.hpp"
11#include "input/MouseButton.hpp"
12#include "misc/Timer.h"
13#include "misc/Globals.h"
158 const std::function<
void(
const std::optional<Error>&)>& onCreated,
194 const std::function<
void(
const std::optional<Error>&)>& onLoaded,
195 const std::filesystem::path& pathToNodeTree,
440 std::recursive_mutex,
470 std::recursive_mutex,
471 std::unordered_map<
unsigned int, std::function<void(
KeyboardModifiers,
float)>>>*
499 std::recursive_mutex,
505 std::recursive_mutex,
Definition: CameraManager.h:16
Definition: GameInstance.h:32
float getWorldTimeInSeconds() const
Definition: GameInstance.cpp:149
sgc::GcPtr< Node > getWorldRootNode() const
Definition: GameInstance.cpp:147
long long getGarbageCollectorRunIntervalInSec()
Definition: GameInstance.cpp:25
InputManager * getInputManager() const
Definition: GameInstance.cpp:23
void onInputAxisEvent(unsigned int iAxisEventId, KeyboardModifiers modifiers, float input)
Definition: GameInstance.cpp:87
virtual void onWindowFocusChanged(bool bIsFocused)
Definition: GameInstance.h:396
CameraManager * getCameraManager() const
Definition: GameInstance.cpp:21
void stopAndDisableCreatedTimers()
Definition: GameInstance.cpp:63
bool bAllowCreatingTimers
Definition: GameInstance.h:519
size_t getTotalSpawnedNodeCount()
Definition: GameInstance.cpp:153
virtual void onBeforeNewFrame(float timeSincePrevCallInSec)
Definition: GameInstance.h:350
void queueGarbageCollection(bool bForce, const std::optional< std::function< void()> > &onFinished={})
Definition: GameInstance.cpp:120
Window * pGameWindow
Definition: GameInstance.h:522
std::pair< std::recursive_mutex, std::vector< std::unique_ptr< Timer > > > mtxCreatedTimers
Definition: GameInstance.h:516
void onInputActionEvent(unsigned int iActionId, KeyboardModifiers modifiers, bool bIsPressedDown)
Definition: GameInstance.cpp:73
virtual void onMouseInput(MouseButton button, KeyboardModifiers modifiers, bool bIsPressedDown)
Definition: GameInstance.h:372
virtual void onGameStarted()
Definition: GameInstance.h:340
void executeShaderManagerSelfValidation() const
Definition: GameInstance.cpp:129
InputManager * pInputManager
Definition: GameInstance.h:530
virtual void onWindowClose()
Definition: GameInstance.h:413
static float getTotalApplicationTimeInSec()
Definition: GameInstance.cpp:17
size_t getCalledEveryFrameNodeCount()
Definition: GameInstance.cpp:155
std::pair< std::recursive_mutex, std::unordered_map< unsigned int, std::function< void(KeyboardModifiers, bool)> > > mtxBindedActionEvents
Definition: GameInstance.h:501
void loadNodeTreeAsWorld(const std::function< void(const std::optional< Error > &)> &onLoaded, const std::filesystem::path &pathToNodeTree, size_t iWorldSize=Globals::getDefaultWorldSize())
Definition: GameInstance.cpp:113
virtual void onFramebufferSizeChanged(int iWidth, int iHeight)
Definition: GameInstance.h:404
void addDeferredTask(const std::function< void()> &task) const
Definition: GameInstance.cpp:100
Window * getWindow() const
Definition: GameInstance.cpp:19
std::pair< std::recursive_mutex, std::unordered_map< unsigned int, std::function< void(KeyboardModifiers, bool)> > > * getActionEventBindings()
Definition: GameInstance.cpp:136
Timer * createTimer(const std::string &sTimerName)
Definition: GameInstance.cpp:29
virtual void onMouseScrollMove(int iOffset)
Definition: GameInstance.h:389
GameManager * pGameManager
Definition: GameInstance.h:525
virtual void onKeyboardInput(KeyboardKey key, KeyboardModifiers modifiers, bool bIsPressedDown)
Definition: GameInstance.h:361
virtual void onMouseMove(double xOffset, double yOffset)
Definition: GameInstance.h:382
void setGarbageCollectorRunInterval(long long iGcRunIntervalInSec)
Definition: GameInstance.cpp:125
std::pair< std::recursive_mutex, std::unordered_map< unsigned int, std::function< void(KeyboardModifiers, float)> > > * getAxisEventBindings()
Definition: GameInstance.cpp:143
size_t getWorldSize() const
Definition: GameInstance.cpp:151
std::pair< std::recursive_mutex, std::unordered_map< unsigned int, std::function< void(KeyboardModifiers, float)> > > mtxBindedAxisEvents
Definition: GameInstance.h:507
void addTaskToThreadPool(const std::function< void()> &task) const
Definition: GameInstance.cpp:104
void createWorld(const std::function< void(const std::optional< Error > &)> &onCreated, size_t iWorldSize=Globals::getDefaultWorldSize())
Definition: GameInstance.cpp:108
Definition: GameManager.h:34
static constexpr size_t getDefaultWorldSize()
Definition: Globals.h:33
Definition: KeyboardKey.hpp:10