Changeset 9869 in orxonox.OLD for trunk/src/world_entities/weapons/weapon.h
- Timestamp:
- Oct 3, 2006, 12:19:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/weapon.h
r8976 r9869 19 19 #include "ammo_container.h" 20 20 21 #include "sound_buffer.h" 22 21 23 // FORWARD DECLARATION 22 24 class Projectile; … … 83 85 class Weapon : public WorldEntity 84 86 { 87 ObjectListDeclaration(Weapon); 88 85 89 public: 86 90 // INITIALISATION // 87 91 Weapon (); 88 92 virtual ~Weapon (); 89 static Weapon* createWeapon(ClassID weaponID); 93 static Weapon* createWeapon(const ClassID& weaponID); 94 static Weapon* createWeapon(const std::string& weaponName); 90 95 91 96 void init(); … … 110 115 /** @returns the Capabilities of this Weapon */ 111 116 inline long getCapability() const { return this->capability; }; 112 void setProjectileType( ClassIDprojectile);117 void setProjectileType(const ClassID& projectile); 113 118 void setProjectileTypeC(const std::string& projectile); 114 119 /** @returns The projectile's classID */ … … 216 221 // PHASES // 217 222 //////////// 218 OrxSound::SoundSource* soundSource; 219 220 WeaponState currentState; 221 WeaponAction requestedAction; 222 float stateDuration; 223 float times[WS_STATE_COUNT]; 224 Animation3D* animation[WS_STATE_COUNT]; 225 OrxSound::SoundBuffer * soundBuffers[WA_ACTION_COUNT];//!< SoundBuffers for all actions @see WeaponAction.223 OrxSound::SoundSource* soundSource; //!< A SoundSource to play sound from (this is connected to the PNode of the Weapon) 224 225 WeaponState currentState; //!< The State the weapon is in. 226 WeaponAction requestedAction; //!< An action to try to Engage after the currentState ends. 227 float stateDuration; //!< how long the state has taken until now. 228 float times[WS_STATE_COUNT]; //!< Times to stay in the different States @see WeaponState. 229 Animation3D* animation[WS_STATE_COUNT]; //!< Animations for all the States (you can say yourself on what part of the gun this animation acts). 230 OrxSound::SoundBuffer soundBuffers[WA_ACTION_COUNT]; //!< SoundBuffers for all actions @see WeaponAction. 226 231 227 232 PNode emissionPoint; //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
Note: See TracChangeset
for help on using the changeset viewer.