Olympe Engine
2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Source
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>
8
#include "
system/system_utils.h
"
9
10
class
GameRules
11
{
12
public
:
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
17
static
GameRules
&
GetInstance
()
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
};
GetComponentTypeID_Static
ComponentTypeID GetComponentTypeID_Static()
Definition
ECS_Entity.h:56
GameRules
Definition
GameRules.h:11
GameRules::~GameRules
~GameRules()
Definition
GameRules.h:15
GameRules::name
std::string name
Definition
GameRules.h:13
GameRules::Validate
bool Validate() const
Definition
GameRules.h:26
GameRules::GetInstance
static GameRules & GetInstance()
Definition
GameRules.h:17
GameRules::Get
static GameRules & Get()
Definition
GameRules.h:22
GameRules::GameRules
GameRules(const std::string &n="DefaultRules")
Definition
GameRules.h:14
system_utils.h
SYSTEM_LOG
#define SYSTEM_LOG
Definition
system_utils.h:23
Generated on Tue Feb 17 2026 13:49:10 for Olympe Engine by
1.9.8