Changeset 646
- Timestamp:
- Dec 19, 2007, 5:04:07 AM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/CMakeLists.txt
r643 r646 43 43 objects/weapon_system/bullet_manager.cc 44 44 objects/weapon_system/weapon_station.cc 45 objects/Explosion.cc 45 46 ) 46 47 ELSE(WIN32) -
code/branches/FICN/src/orxonox/core/Iterator.h
r496 r646 56 56 57 57 /** 58 @brief Overloading of the it++ operator: Iterator points to the next object in the list. 59 @return The Iterator itself 60 */ 61 Iterator<T> operator++(int i) 62 { 63 Iterator<T> copy = *this; 64 this->element_ = this->element_->next_; 65 return copy; 66 } 67 68 /** 58 69 @brief Overloading of the --it operator: Iterator points to the previous object in the list. 59 70 @return The Iterator itself … … 63 74 this->element_ = this->element_->prev_; 64 75 return *this; 76 } 77 78 /** 79 @brief Overloading of the it-- operator: Iterator points to the previous object in the list. 80 @return The Iterator itself 81 */ 82 Iterator<T> operator--(int i) 83 { 84 Iterator<T> copy = *this; 85 this->element_ = this->element_->prev_; 86 return copy; 65 87 } 66 88 -
code/branches/FICN/src/orxonox/objects/CMakeLists.txt
r643 r646 27 27 weapon_system/bullet_manager.cc 28 28 weapon_system/weapon_station.cc 29 Explosion.cc 29 30 ) 30 31 -
code/branches/FICN/src/orxonox/objects/Model.cc
r631 r646 31 31 create(); 32 32 } 33 33 34 34 bool Model::create(){ 35 35 if(meshSrc_.compare("")!=0){ … … 41 41 return true; 42 42 } 43 43 44 44 void Model::registerAllVariables(){ 45 45 registerVar(&meshSrc_, meshSrc_.length()+1, network::STRING); -
code/branches/FICN/src/orxonox/objects/Model.h
r630 r646 12 12 public: 13 13 Model(); 14 ~Model();14 virtual ~Model(); 15 15 virtual void loadParams(TiXmlElement* xmlElem); 16 16 bool create(); -
code/branches/FICN/src/orxonox/objects/Projectile.cc
r644 r646 1 1 #include "Projectile.h" 2 2 #include "../core/CoreIncludes.h" 3 #include "Explosion.h" 4 #include "Model.h" 3 5 4 6 namespace orxonox … … 35 37 } 36 38 39 void Projectile::tick(float dt) 40 { 41 WorldEntity::tick(dt); 42 43 float radius; 44 for (Iterator<Model> it = ObjectList<Model>::start(); it; ++it) 45 { 46 if ((*it) != this->owner_) 47 { 48 radius = it->getScale().x * 3.0; 49 50 if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius)) 51 { 52 Explosion* eplosion = new Explosion(this); 53 delete this; 54 return; 55 } 56 } 57 } 58 } 59 37 60 void Projectile::destroyObject() 38 61 { -
code/branches/FICN/src/orxonox/objects/Projectile.h
r643 r646 13 13 public: 14 14 Projectile(SpaceShip* owner = 0); 15 ~Projectile();15 virtual ~Projectile(); 16 16 void destroyObject(); 17 virtual void tick(float dt); 17 18 18 19 private: -
code/branches/FICN/src/orxonox/objects/SpaceShip.cc
r644 r646 46 46 47 47 SetConfigValue(bInvertMouse_, true); 48 SetConfigValue(reloadTime_, 0.1 );48 SetConfigValue(reloadTime_, 0.125); 49 49 50 50 this->setMouseEventCallback_ = false; -
code/branches/FICN/src/orxonox/objects/Tickable.h
r640 r646 46 46 { 47 47 // Iterate through all Tickables and call their tick(dt) function 48 for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)49 it->tick(evt.timeSinceLastFrame);48 for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ) 49 (it++)->tick(evt.timeSinceLastFrame); 50 50 51 51 return FrameListener::frameStarted(evt); -
code/branches/FICN/src/orxonox/objects/Timer.h
r640 r646 136 136 { 137 137 // Iterate through all Timers 138 for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; ++it)138 for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; ) 139 139 { 140 140 if (it->isActive()) … … 151 151 it->stopTimer(); // Stop the timer if we don't want to loop 152 152 153 it->run();153 (it++)->run(); 154 154 } 155 else 156 ++it; 155 157 } 158 else 159 ++it; 156 160 } 157 161 -
code/branches/FICN/src/orxonox/objects/WorldEntity.h
r643 r646 18 18 public: 19 19 WorldEntity(); 20 ~WorldEntity();20 virtual ~WorldEntity(); 21 21 22 22 virtual void tick(float dt); -
code/branches/FICN/src/orxonox/particle/ParticleInterface.cc
r618 r646 40 40 ParticleInterface::~ParticleInterface(void) 41 41 { 42 std::cout << "blubiblub_1\n"; 42 43 sceneManager_->destroyParticleSystem(particleSystem_); 44 std::cout << "blubiblub_2\n"; 43 45 44 delete sceneNode_;45 delete particleSystem_;46 delete sceneManager_;46 // delete sceneNode_; 47 // delete particleSystem_; 48 // delete sceneManager_; 47 49 } 48 50 … … 80 82 } 81 83 82 void ParticleInterface::det tachFromSceneNode ( void )84 void ParticleInterface::detachFromSceneNode ( void ) 83 85 { 84 86 sceneNode_->detachObject(particleSystem_); -
code/branches/FICN/src/orxonox/particle/ParticleInterface.h
r621 r646 22 22 ~ParticleInterface( void ); 23 23 void addToSceneNode( Ogre::SceneNode* sceneNode ); 24 void det tachFromSceneNode( void );24 void detachFromSceneNode( void ); 25 25 Ogre::ParticleEmitter* getEmitter ( int emitterNr ); 26 26 void newEmitter ( void );
Note: See TracChangeset
for help on using the changeset viewer.