1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: hdavid, amaechler |
---|
13 | */ |
---|
14 | |
---|
15 | #include "lightening_effect.h" |
---|
16 | |
---|
17 | #include "util/loading/load_param.h" |
---|
18 | #include "util/loading/factory.h" |
---|
19 | #include "render2D/billboard.h" |
---|
20 | |
---|
21 | #include "glincl.h" |
---|
22 | #include "parser/tinyxml/tinyxml.h" |
---|
23 | |
---|
24 | using namespace std; |
---|
25 | |
---|
26 | CREATE_FACTORY(LighteningEffect, CL_LIGHTENING_EFFECT); |
---|
27 | |
---|
28 | LighteningEffect::LighteningEffect(const TiXmlElement* root) |
---|
29 | { |
---|
30 | this->setClassID(CL_LIGHTENING_EFFECT, "LighteningEffect"); |
---|
31 | |
---|
32 | |
---|
33 | lightening = new Billboard(NULL); |
---|
34 | lightening->setTexture("pictures/lense_flare/lens2.png"); |
---|
35 | lightening->setSize(50, 50); |
---|
36 | lightening->setAbsCoor2D(0,0); |
---|
37 | lightening->setVisibility(true); |
---|
38 | |
---|
39 | this->init(); |
---|
40 | |
---|
41 | if (root != NULL) |
---|
42 | this->loadParams(root); |
---|
43 | |
---|
44 | this->activate(); |
---|
45 | } |
---|
46 | |
---|
47 | LighteningEffect::~LighteningEffect() |
---|
48 | { |
---|
49 | this->deactivate(); |
---|
50 | delete lightening; |
---|
51 | } |
---|
52 | |
---|
53 | void LighteningEffect::loadParams(const TiXmlElement* root) |
---|
54 | { |
---|
55 | WeatherEffect::loadParams(root); |
---|
56 | } |
---|
57 | |
---|
58 | |
---|
59 | bool LighteningEffect::init() |
---|
60 | { |
---|
61 | //Default values |
---|
62 | } |
---|
63 | |
---|
64 | |
---|
65 | bool LighteningEffect::activate() |
---|
66 | { |
---|
67 | PRINTF(0)( "Activating LighteningEffect\n" ); |
---|
68 | |
---|
69 | } |
---|
70 | |
---|
71 | |
---|
72 | bool LighteningEffect::deactivate() |
---|
73 | { |
---|
74 | PRINTF(0)("Deactivating LighteningEffect\n"); |
---|
75 | } |
---|
76 | |
---|
77 | void LighteningEffect::tick (float dt) |
---|
78 | { |
---|
79 | |
---|
80 | } |
---|