Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
GameRules.h
Go to the documentation of this file.
1/* GameRules.h
2 Defines rules for a videogame (placeholder).
3*/
4#pragma once
5
6#include <string>
7#include <iostream>
9
11{
12public:
13 std::string name;
14 GameRules(const std::string& n = "DefaultRules") : name(n) { SYSTEM_LOG << "GameRules '" << name << "' created\n"; }
15 ~GameRules() { SYSTEM_LOG << "GameRules '" << name << "' destroyed\n"; }
16
18 {
19 static GameRules instance;
20 return instance;
21 }
22 static GameRules& Get() { return GetInstance(); }
23
24
25 // Placeholder for rule checks
26 bool Validate() const { return true; }
27};
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
std::string name
Definition GameRules.h:13
bool Validate() const
Definition GameRules.h:26
static GameRules & GetInstance()
Definition GameRules.h:17
static GameRules & Get()
Definition GameRules.h:22
GameRules(const std::string &n="DefaultRules")
Definition GameRules.h:14
#define SYSTEM_LOG