[7679] | 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 | |
---|
[7807] | 17 | #include "state.h" |
---|
[7679] | 18 | #include "util/loading/load_param.h" |
---|
| 19 | #include "util/loading/factory.h" |
---|
[7951] | 20 | #include "effects/billboard.h" |
---|
[7679] | 21 | |
---|
| 22 | #include "glincl.h" |
---|
| 23 | #include "parser/tinyxml/tinyxml.h" |
---|
| 24 | |
---|
| 25 | using namespace std; |
---|
| 26 | |
---|
| 27 | CREATE_FACTORY(LighteningEffect, CL_LIGHTENING_EFFECT); |
---|
| 28 | |
---|
| 29 | LighteningEffect::LighteningEffect(const TiXmlElement* root) |
---|
| 30 | { |
---|
| 31 | this->setClassID(CL_LIGHTENING_EFFECT, "LighteningEffect"); |
---|
[7699] | 32 | |
---|
| 33 | |
---|
[7951] | 34 | billboard = new Billboard(NULL); |
---|
[7981] | 35 | billboard->setTexture("maps/lightning_bolt.png"); |
---|
[7951] | 36 | //billboard->setSize(50, 50); |
---|
| 37 | //billboard->setAbsCoor2D(10,10); |
---|
| 38 | //billboard->setVisibility(true); |
---|
[7699] | 39 | |
---|
[7807] | 40 | |
---|
[7679] | 41 | this->init(); |
---|
| 42 | |
---|
| 43 | if (root != NULL) |
---|
| 44 | this->loadParams(root); |
---|
| 45 | |
---|
| 46 | this->activate(); |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | LighteningEffect::~LighteningEffect() |
---|
| 50 | { |
---|
| 51 | this->deactivate(); |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | void LighteningEffect::loadParams(const TiXmlElement* root) |
---|
| 55 | { |
---|
| 56 | WeatherEffect::loadParams(root); |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | |
---|
| 60 | bool LighteningEffect::init() |
---|
| 61 | { |
---|
| 62 | //Default values |
---|
| 63 | } |
---|
| 64 | |
---|
| 65 | |
---|
| 66 | bool LighteningEffect::activate() |
---|
| 67 | { |
---|
[7699] | 68 | PRINTF(0)( "Activating LighteningEffect\n" ); |
---|
[7679] | 69 | |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | bool LighteningEffect::deactivate() |
---|
| 74 | { |
---|
| 75 | PRINTF(0)("Deactivating LighteningEffect\n"); |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | void LighteningEffect::tick (float dt) |
---|
| 79 | { |
---|
| 80 | |
---|
| 81 | } |
---|