-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLevel.cpp
More file actions
44 lines (26 loc) · 668 Bytes
/
Level.cpp
File metadata and controls
44 lines (26 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "Level.h"
Level::Level(bool load, wstring path) {
this->path = path;
this->load = load;
}
Level::~Level() {
}
void Level::Load() {
if (load && path != L"") World::Load(gfx, path);
else World::Init(gfx);
Animations.push_back(new Character(Path::character, gfx, SCREEN_WIDTH / 2, SCREEN_WIDTH / 64 + 64, 6));
}
void Level::Unload() {
World::Unload();
Animations.clear();
cout << "poszlo" << endl;
}
void Level::Update() {
World::Update();
for (auto i : Animations) i->Update();
}
void Level::Render() {
gfx->ClearScreen(0, 0, 0);
World::Render();
for (auto i : Animations) i->Render();
}