Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Level.h
Go to the documentation of this file.
1/* Level.h
2 Contains multiple sectors and manages them.
3*/
4#pragma once
5
6#include "Sector.h"
7#include <vector>
8#include <memory>
9#include <string>
10#include <iostream>
11
12class Level
13{
14public:
15 std::string name;
16 std::vector<std::unique_ptr<Sector>> sectors;
17
18 Level(const std::string& n = "Level") : name(n)
19 {
20 SYSTEM_LOG << "Level '" << name << "' created\n";
21 }
23 {
24 SYSTEM_LOG << "Level '" << name << "' destroyed\n";
25 }
26
27 void AddSector(std::unique_ptr<Sector> s)
28 {
29 sectors.push_back(std::move(s));
30 }
31};
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Definition Level.h:13
~Level()
Definition Level.h:22
Level(const std::string &n="Level")
Definition Level.h:18
void AddSector(std::unique_ptr< Sector > s)
Definition Level.h:27
std::string name
Definition Level.h:15
std::vector< std::unique_ptr< Sector > > sectors
Definition Level.h:16
#define SYSTEM_LOG