Untitled Game engine no.5
1.0
include
System.hpp
1
#ifndef SYSTEM_H
2
#define SYSTEM_H
3
4
#include <algorithm>
5
#include <iostream>
6
#include "ECS.hpp"
7
#include "SystemBase.hpp"
8
9
namespace
Engine
{
10
template
<
class
... Cs>
12
class
System
:
public
SystemBase
{
13
public
:
15
System
() {
16
m_arch
.reset();
17
std::vector<EntityID> ids = {{Component<Cs>::GetTypeID()...}};
18
for
(
auto
& i : ids) {
19
m_arch
.set(i, 1);
20
}
21
}
22
23
virtual
void
Run
(EntityID
id
)
override
{ }
24
};
25
26
}
27
#endif
Engine::SystemBase::m_arch
Archetype m_arch
archetype storage
Definition:
SystemBase.hpp:25
Engine::System::System
System()
Constructor.
Definition:
System.hpp:15
Engine::System::Run
virtual void Run(EntityID id) override
Definition:
System.hpp:23
Engine::System
System with multiple types of components.
Definition:
System.hpp:12
Engine::SystemBase
Definition:
SystemBase.hpp:8
Engine
Definition:
Animation.hpp:14
Generated by
1.8.17