-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInfectedForest.cpp
More file actions
36 lines (27 loc) · 960 Bytes
/
InfectedForest.cpp
File metadata and controls
36 lines (27 loc) · 960 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
//
// Created by viviane on 22/11/2021.
//
#include "InfectedForest.h"
namespace levels{
InfectedForest::InfectedForest() : Level(){ }
InfectedForest::InfectedForest(Player* p1, Player* p2) : Level(p1, p2){
initializeElements();
}
InfectedForest::~InfectedForest(){
}
void InfectedForest::initializeElements(){
setBackground(assets->operator[]("infectedForest"));
setPosition(0,0);
levelMaker.createStrongGoblin();
levelMaker.createWeakGoblin();
levelMaker.createBossGoblin();
levelMaker.renderObstacles();
levelMaker.renderFinishLine();
for (int i = 0; i < entityList->getLen(); i++){
entityList->getItem(i)->setFeetPosition(725);
if (entityList->getItem(i)->getId() == fire_pit_id || entityList->getItem(i)->getId() == finish_line_id){
entityList->getItem(i)->setFeetPosition(775);
}
}
}
}