Changeset 4837 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons
- Timestamp:
- Jul 12, 2005, 3:11:57 AM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities/weapons
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/weapon_manager.cc
r4834 r4837 25 25 #include "vector.h" 26 26 #include "list.h" 27 #include "t_animation.h" 27 28 28 29 using namespace std; … … 76 77 this->currConfID = W_CONFIG0; 77 78 this->crosshair = new Crosshair(); 78 } 79 80 /** 81 * 79 80 this->crossHairSizeAnim = new tAnimation<Crosshair>(this->crosshair, &Crosshair::setSize); 81 this->crossHairSizeAnim->setInfinity(ANIM_INF_REWIND); 82 this->crossHairSizeAnim->addKeyFrame(50, .1, ANIM_LINEAR); 83 this->crossHairSizeAnim->addKeyFrame(100, .05, ANIM_LINEAR); 84 this->crossHairSizeAnim->addKeyFrame(50, .01, ANIM_LINEAR); 85 } 86 87 /** 88 * loads the settings of the WeaponManager 82 89 * @param root the XML-element to load from 83 90 */ … … 207 214 208 215 209 210 216 /** 211 217 * triggers fire of all weapons in the current weaponconfig … … 219 225 if( firingWeapon != NULL) firingWeapon->fire(); 220 226 } 221 this->crosshair->setRotationSpeed(-500); 227 this->crosshair->setRotationSpeed(500); 228 this->crossHairSizeAnim->replay(); 222 229 } 223 230 -
orxonox/trunk/src/world_entities/weapons/weapon_manager.h
r4836 r4837 33 33 class Weapon; 34 34 class Crosshair; 35 template <class T> class tAnimation; 35 36 36 37 #define W_MAX_SLOTS 8 … … 57 58 58 59 //! this is a weapon Configuration: it has up to 8 slots 59 typedef struct weaponConfig60 typedef struct 60 61 { 61 62 bool bUsed; //!< is set to true, if this configuration is 62 63 Weapon* slots[8]; 63 } ;64 } weaponConfig; 64 65 65 66 … … 85 86 86 87 private: 87 Crosshair* crosshair; //!< an aim.88 int getNextFreeSlot(int configID); 88 89 89 int nrOfSlots; //<! number of weapon slots a ship has90 int currConfID; //<! the currently selected config91 weaponConfig configs[4]; //<! a list of four configurations90 private: 91 Crosshair* crosshair; //!< an aim. 92 tAnimation<Crosshair>* crossHairSizeAnim; 92 93 93 int getNextFreeSlot(int configID); 94 int nrOfSlots; //<! number of weapon slots a ship has 95 int currConfID; //<! the currently selected config 96 weaponConfig configs[4]; //<! a list of four configurations 97 94 98 };
Note: See TracChangeset
for help on using the changeset viewer.