-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTrench.cpp
39 lines (31 loc) · 803 Bytes
/
Trench.cpp
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
/*
* Trench.cpp
*/
//Dragonfly Headers
#include "LogManager.h"
#include "ResourceManager.h"
//Game Headers
#include "Trench.h"
Trench::Trench(df::Position p) {
df::ResourceManager &resource_manager = df::ResourceManager::getInstance();
df::LogManager &log_manager = df::LogManager::getInstance();
// Link to "trench" sprite
df::Sprite *p_temp_sprite;
p_temp_sprite = resource_manager.getSprite("trench");
if (!p_temp_sprite) {
log_manager.writeLog("Trench::Trench(): Warning! Sprite '%s' not found", "trench");
}
else {
setSprite(p_temp_sprite);
setSpriteSlowdown(0);
}
setType("Trench");
setSolidness(df::Solidness::SOFT);
//Set starting position
setPosition(p);
}
// Handle event.
// Return 0 if ignored, else 1.
int Trench::eventHandler(const df::Event *p_e) {
return 0;
}