-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLightingObject.cpp
More file actions
37 lines (32 loc) · 865 Bytes
/
Copy pathLightingObject.cpp
File metadata and controls
37 lines (32 loc) · 865 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
#include "commons.h"
#include "LightingObject.h"
using namespace std;
using namespace cml;
using namespace loaders;
using namespace game_utils;
namespace game_objects
{
namespace block_objects
{
CLightingObject::CLightingObject(string name, vector3f position, LIGHTING_OBJECT_TYPE lot)
: CBlockObject(name,position,NULL,0.0f)
{
this->lot = lot;
setModel(CV_GAME_MANAGER->getResourceManager()->getModel(name));
// load effect according to the type
if (lot == LOT_CANDLE)
{
effectName = "EFFECTS_CANDLE";
setEffect(CV_GAME_MANAGER->getResourceManager()->getEffect(effectName));
}
else if (lot == LOT_TORCH_LIT)
{
effectName = "EFFECTS_TORCH";
setEffect(CV_GAME_MANAGER->getResourceManager()->getEffect(effectName));
}
}
CLightingObject::~CLightingObject()
{
}
};
};