Changeset 6218 in orxonox.OLD for branches/christmas_branche/src/world_entities
- Timestamp:
- Dec 21, 2005, 12:05:55 PM (19 years ago)
- Location:
- branches/christmas_branche/src/world_entities
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/world_entities/creatures/md2_creature.cc
r6212 r6218 181 181 this->cameraConnNode.addChild(this->getWeaponManager()->getFixedTarget()); 182 182 this->getWeaponManager()->getFixedTarget()->setRelCoor(10,0,0); 183 184 } 185 186 187 void MD2Creature::enter() 188 { 189 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 190 191 192 } 193 194 void MD2Creature::leave() 195 { 196 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 197 183 198 184 199 } -
branches/christmas_branche/src/world_entities/creatures/md2_creature.h
r6208 r6218 26 26 void init(); 27 27 void loadParams(const TiXmlElement* root); 28 29 virtual void enter(); 30 virtual void leave(); 28 31 29 32 void addWeapon(Weapon* weapon ); -
branches/christmas_branche/src/world_entities/player.cc
r6216 r6218 95 95 if (this->controllable != (*node) && (dynamic_cast<PNode*>(*node)->getAbsCoor() - this->controllable->getAbsCoor()).len() < 10.0) 96 96 { 97 this->controllable->leave(); 97 98 this->disconnectControllable(); 98 99 this->setControllable(dynamic_cast<Playable*>(*node)); 100 this->controllable->enter(); 99 101 State::getCamera()->setParentSoft(this->controllable); 100 102 State::getCameraTarget()->setParentSoft(this->controllable); -
branches/christmas_branche/src/world_entities/space_ships/helicopter.cc
r6213 r6218 182 182 { 183 183 static_cast<WorldEntity*>(this)->loadParams(root); 184 } 185 186 187 188 189 void Helicopter::enter() 190 { 191 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 192 193 194 } 195 196 void Helicopter::leave() 197 { 198 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 199 200 184 201 } 185 202 -
branches/christmas_branche/src/world_entities/space_ships/helicopter.h
r6162 r6218 24 24 void loadParams(const TiXmlElement* root); 25 25 26 virtual void enter(); 27 virtual void leave(); 28 26 29 void addWeapon(Weapon* weapon ); 27 30 void removeWeapon(Weapon* weapon); … … 39 42 40 43 private: 41 42 44 void calculateVelocity(float time); 43 45 void weaponAction(); … … 65 67 float travelSpeed; //!< the current speed of the player (to make soft movement) 66 68 float acceleration; //!< the acceleration of the player. 67 69 68 70 float airViscosity; 69 71 -
branches/christmas_branche/src/world_entities/space_ships/space_ship.cc
r6204 r6218 177 177 this->getWeaponManager()->getFixedTarget()->setRelCoor(100000,0,0); 178 178 179 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 179 180 } 180 181 … … 188 189 } 189 190 191 192 void SpaceShip::enter() 193 { 194 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 195 196 197 } 198 199 void SpaceShip::leave() 200 { 201 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false); 202 203 204 } 190 205 191 206 /** -
branches/christmas_branche/src/world_entities/space_ships/space_ship.h
r6162 r6218 26 26 void init(); 27 27 void loadParams(const TiXmlElement* root); 28 29 virtual void enter(); 30 virtual void leave(); 28 31 29 32 void addWeapon(Weapon* weapon );
Note: See TracChangeset
for help on using the changeset viewer.