16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 03:09:18 +02:00

ECS System WIP

This commit is contained in:
2026-04-07 23:40:03 +02:00
parent f6db9978d2
commit 8e9fd9225f
30 changed files with 1133 additions and 242 deletions

View File

@@ -37,6 +37,9 @@ http://mozilla.org/MPL/2.0/.
#include <discord_rpc.h>
#endif
#include "entitysystem/SceneManager.h"
#include "entitysystem/scenes/GameScene.h"
#include <chrono>
#include "utilities/translation.h"
@@ -452,6 +455,8 @@ bool eu07_application::is_client() const
int eu07_application::run()
{
auto frame{0};
sceneManager.SetScene(std::make_unique<GameScene>());
// main application loop
while (!glfwWindowShouldClose(m_windows.front()) && !m_modestack.empty())
{
@@ -474,6 +479,9 @@ int eu07_application::run()
double frameStartTime = Timer::GetTime();
float dt = (float) Timer::GetDeltaTime();
sceneManager.Update(dt);
if (m_modes[m_modestack.top()]->is_command_processor())
{
// active mode is doing real calculations (e.g. drivermode)