- Timestamp:
- Jan 29, 2007, 6:51:25 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/weapons
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/weapons/acid_launcher.cc
r10419 r10486 32 32 33 33 #include "util/loading/factory.h" 34 35 #include "elements/glgui_energywidgetvertical.h" 34 36 35 37 … … 122 124 void AcidLauncher::tick(float dt) 123 125 { 126 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 127 { 128 this->energyWidget->setDisplayedImage("textures/gui/gui_acid.png"); 129 this->isEnergyWidgetInitialized = true; 130 } 131 124 132 if (!Weapon::tickW(dt)) 125 133 return; -
branches/playability/src/world_entities/weapons/heavy_blaster.cc
r10485 r10486 10 10 11 11 #include "loading/fast_factory.h" 12 13 #include "elements/glgui_energywidgetvertical.h" 12 14 13 15 CREATE_FACTORY(HeavyBlaster); … … 259 261 glPopMatrix(); 260 262 } 263 264 void HeavyBlaster::tick(float dt) 265 { 266 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 267 { 268 this->energyWidget->setDisplayedImage("textures/gui/gui_heavy_bolt.png"); 269 this->setEnergyWidgetInitialized(true); 270 } 271 } -
branches/playability/src/world_entities/weapons/heavy_blaster.h
r10368 r10486 29 29 virtual void fire(); 30 30 31 virtual void tick(float dt); 32 31 33 virtual void draw() const; 32 34 -
branches/playability/src/world_entities/weapons/light_blaster.cc
r10484 r10486 10 10 11 11 #include "loading/fast_factory.h" 12 13 #include "elements/glgui_energywidgetvertical.h" 12 14 13 15 CREATE_FACTORY(LightBlaster); … … 123 125 } 124 126 125 126 127 void LightBlaster::fire() 127 128 { … … 173 174 static_cast<StaticModel*>(this->getModel())->draw(); 174 175 glPopMatrix(); 176 175 177 } 178 179 void LightBlaster::tick(float dt) 180 { 181 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 182 { 183 this->energyWidget->setDisplayedImage("textures/gui/gui_light_bolt.png"); 184 this->setEnergyWidgetInitialized(true); 185 } 186 } -
branches/playability/src/world_entities/weapons/light_blaster.h
r10368 r10486 26 26 virtual void fire(); 27 27 28 virtual void tick(float dt); 29 28 30 virtual void draw() const; 29 31 -
branches/playability/src/world_entities/weapons/medium_blaster.cc
r10485 r10486 10 10 11 11 #include "loading/fast_factory.h" 12 13 #include "elements/glgui_energywidgetvertical.h" 12 14 13 15 // … … 138 140 } 139 141 142 140 143 /** 141 144 * this activates the weapon … … 172 175 glPopMatrix(); 173 176 } 177 178 void MediumBlaster::tick(float dt) 179 { 180 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 181 { 182 this->energyWidget->setDisplayedImage("textures/gui/gui_medium_bold.png"); 183 this->setEnergyWidgetInitialized(true); 184 } 185 } -
branches/playability/src/world_entities/weapons/medium_blaster.h
r10368 r10486 26 26 virtual void fire(); 27 27 28 virtual void tick(float dt); 29 28 30 virtual void draw() const; 29 31 -
branches/playability/src/world_entities/weapons/spike_thrower.cc
r10419 r10486 34 34 35 35 #include "util/loading/factory.h" 36 37 #include "elements/glgui_energywidgetvertical.h" 36 38 37 39 … … 125 127 void SpikeThrower::tick(float dt) 126 128 { 129 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 130 { 131 this->energyWidget->setDisplayedImage("textures/gui/gui_spikeball.png"); 132 this->isEnergyWidgetInitialized = true; 133 } 134 127 135 if (!Weapon::tickW(dt)) 128 136 return; -
branches/playability/src/world_entities/weapons/swarm_launcher.cc
r10419 r10486 33 33 34 34 #include "util/loading/factory.h" 35 36 #include "elements/glgui_energywidgetvertical.h" 35 37 36 38 … … 141 143 142 144 this->setAbsDirSoft(quat, 5); 145 146 if (this->energyWidget != NULL && !this->isEnergyWidgetInitialized) 147 { 148 this->energyWidget->setDisplayedImage("textures/gui/gui_swarm_missiles.png"); 149 this->setEnergyWidgetInitialized(true); 150 } 143 151 } 144 152 -
branches/playability/src/world_entities/weapons/weapon.cc
r10443 r10486 154 154 155 155 this->energyWidget = NULL; 156 isEnergyWidgetInitialized = false; 156 157 157 158 // set this object to be synchronized over network -
branches/playability/src/world_entities/weapons/weapon.h
r10443 r10486 190 190 inline int getPreferedSlot() { return this->preferedSlot; } 191 191 192 inline void setEnergyWidgetInitialized(bool b) {this->isEnergyWidgetInitialized = b;}; 193 192 194 193 195 protected: … … 207 209 208 210 void setPreferedSlot(int slot, int side) { this->preferedSlot = slot; this->preferedSide = side; } 211 212 //gui 213 OrxGui::GLGuiEnergyWidgetVertical* energyWidget; 214 bool isEnergyWidgetInitialized; 209 215 210 216 … … 238 244 float maxCharge; //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled) 239 245 240 OrxGui::GLGuiEnergyWidgetVertical* energyWidget;246 //OrxGui::GLGuiEnergyWidgetVertical* energyWidget; 241 247 242 248 PNode* defaultTarget; //!< A target for targeting Weapons.
Note: See TracChangeset
for help on using the changeset viewer.