Brunot
Loading...
Searching...
No Matches
System.h
Go to the documentation of this file.
1// File: System.h
2// Description: The head of the systems class, where most systems will inherit from.
3// Author(s): Aidan Hartman (aidan.hartman@digipen.edu)
4// 2025 / 09 / 11
5// (C) Digipen 2025
6// ____ __ __ __
7// /\__ _\/\ \ /\ \/\ \
8// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
9// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
10// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
11// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
12// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
13#pragma once
14#include "GameObject.h"
15
16class System : public GameObject
17{
18public:
19 enum class Type : unsigned short
20 {
22 newSystemStub = 100, // so that the Stub can build
23 OpenGL = 200,
24 Input = 300,
25 Editor = 400,
26 Messaging = 500,
27 Camera = 600,
28 Logging = 700,
30 Scoring = 800,
33 Table = 960,
34 SceneManager = 1000, // This is where every Entity get's updated, rendered, etc.
35 Particles = 1050,
36 ActionList = 1100,
37 DebugDraw = 1150,
39 Options = 1400,
40
41 // keep test runner at the end, so it updates last
42 TestRunner = 64'000,
43 };
44
45 auto showMenu() -> void override;
46 [[nodiscard]] auto getKey() const -> Key override;
47
48 auto getParent() const -> GameObject* override;
49
50protected:
54 virtual auto systemShowMenu() -> void
55 {
56 }
57
58 System(const std::string& typeName, Type systemType);
59
60private:
62};
the base class for the engine, most things inherit from this.
Component that stores all actions currently affecting the parent entity.
Definition ActionList.h:30
the base class for the engine, most things inherit from this.
Definition GameObject.h:77
std::string typeName
the typeName of a GameObject.
Definition GameObject.h:545
GameObject(std::string typeName, gobj::Type parentType, gobj::Type type)
constructor for gameobject.
Definition GameObject.cpp:23
Definition Logging.h:21
virtual auto systemShowMenu() -> void
Specific systems should override this function to show their specific menu for the system.
Definition System.h:54
Type
Definition System.h:20
@ PlayerTurn
Definition System.h:32
@ Input
Definition System.h:24
@ Editor
Definition System.h:25
@ Table
Definition System.h:33
@ TestRunner
Definition System.h:42
@ OpenGL
Definition System.h:23
@ system_error_type
Definition System.h:21
@ AudioSystem
Definition System.h:29
@ DebugDraw
Definition System.h:37
@ ColliderSystem
Definition System.h:38
@ HandSystem
Definition System.h:31
@ SceneManager
Definition System.h:34
@ Camera
Definition System.h:27
@ Scoring
Definition System.h:30
@ Particles
Definition System.h:35
@ Messaging
Definition System.h:26
@ newSystemStub
Definition System.h:22
@ Options
Definition System.h:39
auto getParent() const -> GameObject *override
Gets the parent of a GameObject.
Definition System.cpp:44
System(const std::string &typeName, Type systemType)
Definition System.cpp:75
auto showMenu() -> void override
Called before update each frame, for calling ImGui editor code relevant to the gameObject.
Definition System.cpp:19
Type type
Definition System.h:61
auto getKey() const -> Key override
Generates a unique Key that corresponds to the GameObject.
Definition System.cpp:39