Changeset 6306 in orxonox.OLD for trunk/src/world_entities/weapons/turret.cc
- Timestamp:
- Dec 26, 2005, 2:27:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/turret.cc
r6222 r6306 82 82 83 83 this->setStateDuration(WS_SHOOTING, .1); 84 this->setStateDuration(WS_RELOADING, .1);84 this->setStateDuration(WS_RELOADING, 1.0f); 85 85 this->setStateDuration(WS_ACTIVATING, .4); 86 86 this->setStateDuration(WS_DEACTIVATING, .4); 87 87 88 this->setMaximumEnergy(100 00, 50);89 this->increaseEnergy(100 000);88 this->setMaximumEnergy(100, 5); 89 this->increaseEnergy(100); 90 90 //this->minCharge = 2; 91 91 … … 96 96 this->setEmissionPoint(1.684, 0.472, 0); 97 97 //this->getProjectileFactory()->prepare(100); 98 99 this->bar = new GLGuiBar; 100 this->bar->setSize2D( 20, 100); 101 this->bar->setMaximum(this->getEnergyMax()); 102 this->bar->setValue(this->getEnergy()); 103 this->loadedBar = new GLGuiBar; 104 this->loadedBar->setParent2D(this->bar); 105 this->loadedBar->setRelCoor2D(20,0); 106 this->loadedBar->setSize2D(10,50); 107 this->loadedBar->setMaximum(this->getLoadedEnergyMax()); 98 108 } 99 109 … … 106 116 void Turret::activate() 107 117 { 118 this->bar->show(); 119 this->loadedBar->show(); 108 120 } 109 121 110 122 void Turret::deactivate() 111 123 { 124 this->bar->hide(); 125 this->loadedBar->hide(); 112 126 } 113 127 … … 141 155 pj->setAbsDir(this->getAbsDir()); 142 156 pj->activate(); 157 158 this->bar->setValue( this->getEnergy()); 159 this->loadedBar->setValue(this->getLoadedEnergy()); 143 160 } 144 161
Note: See TracChangeset
for help on using the changeset viewer.