Changeset 697
- Timestamp:
- Dec 27, 2007, 5:06:55 AM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/OrxonoxClass.cc
r695 r697 38 38 OrxonoxClass::OrxonoxClass() 39 39 { 40 this->setConfigValues(); 41 40 42 this->identifier_ = 0; 41 43 this->parents_ = 0; … … 43 45 this->bActive_ = true; 44 46 this->bVisible_ = true; 45 46 this->setConfigValues();47 47 } 48 48 -
code/branches/FICN/src/orxonox/objects/Fighter.cc
r668 r697 47 47 RegisterObject(Fighter); 48 48 49 SetConfigValue(bInvertMouse_, false);49 this->setConfigValues(); 50 50 51 51 this->setMouseEventCallback_ = false; … … 104 104 } 105 105 106 void Fighter::setConfigValues() 107 { 108 SetConfigValue(bInvertMouse_, false); 109 } 110 106 111 void Fighter::setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft) 107 112 { -
code/branches/FICN/src/orxonox/objects/Fighter.h
r673 r697 18 18 Fighter(); 19 19 ~Fighter(); 20 void setConfigValues(); 20 21 virtual void loadParams(TiXmlElement* xmlElem); 21 22 void setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft); -
code/branches/FICN/src/orxonox/objects/Projectile.cc
r670 r697 39 39 RegisterObject(Projectile); 40 40 41 this->setConfigValues(); 42 41 43 this->owner_ = owner; 42 43 SetConfigValue(lifetime_, 10.0);44 SetConfigValue(speed_, 2000.0);45 44 46 45 this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1); … … 64 63 } 65 64 65 void Projectile::setConfigValues() 66 { 67 SetConfigValue(lifetime_, 10.0); 68 SetConfigValue(speed_, 2000.0); 69 } 70 66 71 void Projectile::tick(float dt) 67 72 { … … 77 82 if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius)) 78 83 { 79 Explosion* explosion =new Explosion(this);84 new Explosion(this); 80 85 delete this; 81 86 return; -
code/branches/FICN/src/orxonox/objects/Projectile.h
r673 r697 14 14 Projectile(SpaceShip* owner = 0); 15 15 virtual ~Projectile(); 16 void setConfigValues(); 16 17 void destroyObject(); 17 18 virtual void tick(float dt); -
code/branches/FICN/src/orxonox/objects/SpaceShip.cc
r670 r697 45 45 RegisterObject(SpaceShip); 46 46 47 SetConfigValue(bInvertYAxis_, false); 48 SetConfigValue(reloadTime_, 0.125); 47 this->setConfigValues(); 49 48 50 49 this->setMouseEventCallback_ = false; … … 123 122 } 124 123 124 void SpaceShip::setConfigValues() 125 { 126 SetConfigValue(bInvertYAxis_, false); 127 SetConfigValue(reloadTime_, 0.125); 128 } 129 125 130 void SpaceShip::loadParams(TiXmlElement* xmlElem) 126 131 { … … 363 368 if (this->bLMousePressed_ && this->timeToReload_ <= 0) 364 369 { 365 // FIXME, unused var; try recycling of projectiles 366 Projectile* proj = new Projectile(this); 370 new Projectile(this); 367 371 this->timeToReload_ = this->reloadTime_; 368 372 } -
code/branches/FICN/src/orxonox/objects/SpaceShip.h
r673 r697 18 18 SpaceShip(); 19 19 ~SpaceShip(); 20 void setConfigValues(); 20 21 virtual void loadParams(TiXmlElement* xmlElem); 21 22 virtual void tick(float dt);
Note: See TracChangeset
for help on using the changeset viewer.