CoriEngine
Loading...
Searching...
No Matches
System.hpp
Go to the documentation of this file.
1#pragma once
3#include "Concept.hpp"
4
5//* \n SystemPriority can be used to ensure one system is updated before another, it is safe to have more than one system with the same priority,
6//* but I highly discourage toy from doing that as in that case the order is not enforced and can vary from run to run.
7
8namespace Cori {
9 namespace World {
22 class System {
23 public:
24 virtual ~System() = default;
25
26 System(const System&) = delete;
27 System& operator=(const System&) = delete;
28 System(System&&) = delete;
29 System& operator=(System&&) = delete;
30
31 virtual void OnUpdate([[maybe_unused]] Core::GameTimer& gameTimer) {}
32
33 virtual void OnTickUpdate([[maybe_unused]] Core::GameTimer& gameTimer) {}
34
35 virtual void OnImGuiRender([[maybe_unused]] Core::GameTimer& gameTimer) {}
36
37 protected:
38 SceneHandle m_Owner{ nullptr };
39 System() = default;
40 private:
41 friend Scene;
42 void SetOwnerScene(const Scene* scene);
43 };
44 }
45}
A GameTimer is responsible for managing everything that is connected with time, ticks,...
Definition Time.hpp:8
A handle for the scene, checks for scene validity before any call to the scene, if scene is invalid a...
SceneHandle m_Owner
Definition System.hpp:38
System & operator=(const System &)=delete
virtual void OnUpdate(Core::GameTimer &gameTimer)
Definition System.hpp:31
virtual ~System()=default
System & operator=(System &&)=delete
virtual void OnImGuiRender(Core::GameTimer &gameTimer)
Definition System.hpp:35
System(const System &)=delete
System(System &&)=delete
virtual void OnTickUpdate(Core::GameTimer &gameTimer)
Definition System.hpp:33
Anything connected to WorldSystem (ECS) is in this namespace.
Global engine namespace.