- Timestamp:
- Sep 28, 2008, 7:10:08 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/orxonox_tutorial/src/orxonox/objects/TutorialShip.cc
r1852 r1855 45 45 namespace orxonox 46 46 { 47 SetConsoleCommand(TutorialShip, fire, true); 47 SetConsoleCommand(TutorialShip, fire, true).keybindMode(KeybindMode::OnHold); 48 49 CreateFactory(TutorialShip); 48 50 49 51 TutorialShip::TutorialShip() … … 52 54 53 55 // reset variables 56 this->hasSpecialEffects_ = false; 57 58 // set config values 59 this->setConfigValues(); 54 60 } 55 61 … … 65 71 void TutorialShip::setConfigValues() 66 72 { 67 //SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down)."); 68 //SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds"); 69 //SetConfigValue(testvector_, Vector3()).description("asdfblah"); 73 SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds"); 70 74 } 71 75 72 void TutorialShip::registerAllVariables()73 {74 }76 //void TutorialShip::registerAllVariables() 77 //{ 78 //} 75 79 76 80 /** … … 82 86 void TutorialShip::XMLPort(Element& xmlelement, XMLPort::Mode mode) 83 87 { 88 XMLPortParam(TutorialShip, "specialEffects", setSpecialEffects, hasSpecialEffects, xmlelement, mode); 89 90 // Calls SpaceShip::XMLPort 84 91 SUPER(TutorialShip, XMLPort, xmlelement, mode); 92 } 85 93 86 //XMLPortParam(SpaceShip, "camera", setCamera, getCamera, xmlelement, mode); 94 bool TutorialShip::hasSpecialEffects() 95 { 96 return this->hasSpecialEffects_; 97 } 98 99 void TutorialShip::setSpecialEffects(bool value) 100 { 101 this->hasSpecialEffects_ = value; 102 } 103 104 /** 105 @brief Returns the weapon reload time. Used virtually by the base class. 106 */ 107 float TutorialShip::getReloadTime() 108 { 109 return this->reloadTime_; 87 110 } 88 111 … … 95 118 void TutorialShip::fire() 96 119 { 120 SpaceShip::getLocalShip()->doFire(); 97 121 } 98 122 }
Note: See TracChangeset
for help on using the changeset viewer.