Changeset 9505 for code/branches/presentationHS12/src/modules/weapons
- Timestamp:
- Dec 10, 2012, 4:51:44 PM (12 years ago)
- Location:
- code/branches/presentationHS12/src/modules/weapons/weaponmodes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationHS12/src/modules/weapons/weaponmodes/HsW01.cc
r8855 r9505 61 61 this->delay_ = 0.0f; 62 62 this->setMunitionName("LaserMunition"); 63 this->mesh_ = "laserbeam.mesh"; 64 this->sound_ = "sounds/Weapon_HsW01.ogg"; 65 63 66 64 67 this->delayTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&HsW01::shot, this))); 65 68 this->delayTimer_.stopTimer(); 66 69 67 this->setDefaultSound( "sounds/Weapon_HsW01.ogg");70 this->setDefaultSound(this->sound_); 68 71 } 69 72 … … 78 81 XMLPortParam(HsW01, "delay", setDelay, getDelay, xmlelement, mode); 79 82 XMLPortParam(HsW01, "material", setMaterial, getMaterial, xmlelement, mode); 83 XMLPortParam(HsW01, "projectileMesh", setMesh, getMesh, xmlelement, mode); 84 XMLPortParam(HsW01, "sound", setSound, getSound, xmlelement, mode); 80 85 } 81 86 … … 108 113 Projectile* projectile = new Projectile(this); 109 114 Model* model = new Model(projectile); 110 model->setMeshSource( "laserbeam.mesh");115 model->setMeshSource(mesh_); 111 116 model->setCastShadows(false); 112 117 projectile->attach(model); -
code/branches/presentationHS12/src/modules/weapons/weaponmodes/HsW01.h
r8855 r9505 61 61 private: 62 62 /** 63 @brief Set the mesh. 64 @param mesh The mesh name. 65 */ 66 void setMesh(const std::string& mesh) 67 { this->mesh_ = mesh; } 68 69 /** 70 @brief Get the mesh. 71 @return Returns the mesh name. 72 */ 73 const std::string& getMesh() const 74 { return this->mesh_; } 75 76 /** 77 @brief Set the sound. 78 @param mesh The Sound name. 79 */ 80 void setSound(const std::string& sound) 81 { this->sound_ = sound; } 82 83 /** 84 @brief Get the sound. 85 @return Returns the sound name. 86 */ 87 const std::string& getSound() const 88 { return this->sound_; } 89 90 /** 63 91 @brief Set the material. 64 92 @param material The material name. … … 85 113 86 114 std::string material_; //!< The material. 115 std::string mesh_; //!< The mesh. 116 std::string sound_; //!< The sound. 117 118 119 87 120 float speed_; //!< The speed of the fired projectile. 88 121 float delay_; //!< The firing delay.
Note: See TracChangeset
for help on using the changeset viewer.