Changeset 4326 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- May 27, 2005, 3:06:16 AM (20 years ago)
- Location:
- orxonox/trunk/src/story_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified orxonox/trunk/src/story_entities/world.cc ¶
r4324 r4326 25 25 #include "null_parent.h" 26 26 #include "helper_parent.h" 27 #include "pilot_node.h" 27 28 #include "track_node.h" 28 29 #include "world_entity.h" … … 473 474 474 475 476 /** 477 \brief loads the debug world: only for experimental stuff 478 */ 475 479 void World::loadDebugWorld(int worldID) 476 480 { … … 555 559 556 560 557 // create a player558 561 this->localPlayer = new Player (); 559 562 this->localPlayer->setName ("player"); 560 563 this->spawn (this->localPlayer); 561 564 /*monitor progress*/ 562 //this->glmis->step();563 565 this->glmis->step(); 564 566 565 // bind input566 Orxonox *orx = Orxonox::getInstance ();567 orx->getLocalInput()->bind (this->localPlayer);568 569 567 // bind camera 570 568 this->localCamera = new Camera(); 571 569 this->localCamera->setName ("camera"); 572 573 570 /*monitor progress*/ 574 571 this->glmis->step(); … … 591 588 this->glmis->step(); 592 589 590 this->pilotNode = new PilotNode(); 591 this->pilotNode->addChild(this->localPlayer); 592 this->pilotNode->addChild(this->localCamera); 593 // bind input 594 Orxonox *orx = Orxonox::getInstance (); 595 //orx->getLocalInput()->bind (this->pilotNode); 596 597 /* 593 598 PNode* tn = trackManager->getTrackNode(); 594 599 tn->addChild(this->localPlayer); 595 600 this->localCamera->lookAt(tn); 596 597 601 598 602 tn->addChild(this->localCamera); 599 603 this->localPlayer->setMode(PNODE_ALL); 600 604 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 605 */ 601 606 this->glmis->step(); 602 607 break; … … 628 633 { 629 634 this->bPause = false; 635 this->pilotNode = NULL; 630 636 CommandNode* cn = Orxonox::getInstance()->getLocalInput(); 631 637 cn->addToWorld(this); … … 1099 1105 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW4)) this->localCamera->setViewMode(VIEW_RIGHT); 1100 1106 else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW5)) this->localCamera->setViewMode(VIEW_TOP); 1101 1107 else if(this->pilotNode != NULL) if( !strcmp( cmd->cmd, "cursor")) this->pilotNode->command(cmd); 1102 1108 return false; 1103 1109 } -
TabularUnified orxonox/trunk/src/story_entities/world.h ¶
r4261 r4326 24 24 class Text; 25 25 class TiXmlElement; 26 class PilotNode; 26 27 27 28 //! The game world Interface … … 120 121 tList<WorldEntity>* entities; //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them. 121 122 WorldEntity* localPlayer; //!< The Player, you fly through the level. 123 PilotNode* pilotNode; //!< THe pilot node to fly with the mouse 122 124 123 125 GarbageCollector* garbageCollector; //!< reference to the garbage collector
Note: See TracChangeset
for help on using the changeset viewer.