Changeset 4015 in orxonox.OLD
- Timestamp:
- May 2, 2005, 9:23:13 PM (20 years ago)
- Location:
- orxonox/trunk/src/story_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r4010 r4015 256 256 AnimationPlayer::getInstance(); // initializes the animationPlayer 257 257 258 this->localCamera = new Camera(); 259 this->localCamera->setName ("camera"); 258 260 } 259 261 … … 337 339 //todo do this more elegant 338 340 if( element->Value() != NULL && !strcmp( element->Value(), "Player")) localPlayer = (Player*) created; 339 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) sky Box= (SkyBox*) created;341 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) sky = (SkyBox*) created; 340 342 element = element->NextSiblingElement(); 341 343 } … … 360 362 361 363 // free the XML data 364 362 365 delete XMLDoc; 363 364 // finalize world 365 // initialize Font 366 // testFont = new FontSet(); 367 // testFont->buildFont("../data/pictures/font.tga"); 368 369 // create null parent 370 this->nullParent = NullParent::getInstance (); 371 this->nullParent->setName ("NullParent"); 372 373 // finalize myPlayer 374 if( localPlayer == NULL) 375 { 376 PRINTF0("No Player specified in World '%s'\n", this->worldName); 377 return (ErrorMessage){213,"No Player defined","World::load()"}; 378 } 366 /* GENERIC LOADING PROCESS FINISHED */ 379 367 380 368 // bind input … … 383 371 384 372 // bind camera 385 this->localCamera = new Camera();386 this->localCamera->setName ("camera");387 373 //this->localCamera->bind (localPlayer); 388 374 this->localPlayer->addChild (this->localCamera); … … 450 436 451 437 452 // LIGHT initialisation453 lightMan = LightManager::getInstance();454 438 lightMan->setAmbientColor(.1,.1,.1); 455 439 lightMan->addLight(); … … 473 457 trackManager->condition(2, LEFTRIGHT, this->localPlayer); 474 458 459 this->sky->setParent(this->localCamera); 475 460 476 461 // initialize debug coord system … … 541 526 this->glmis->step(); 542 527 543 // Create SkySphere 544 // this->skySphere = new Skysphere("../data/pictures/sky-replace.jpg"); 545 // this->skySphere->setName("SkySphere"); 546 // this->localCamera->addChild(this->skySphere); 547 // this->spawn(this->skySphere); 548 skyBox = new SkyBox(); 549 skyBox->setTexture("pictures/sky/skybox", "jpg"); 550 skyBox->setParent(localCamera); 551 this->spawn(skyBox); 528 sky = new SkyBox(); 529 // (SkyBox*)(sky)->setTexture("pictures/sky/skybox", "jpg"); 530 sky->setParent(localCamera); 531 this->spawn(sky); 552 532 553 533 /*monitor progress*/ … … 610 590 611 591 // Create SkySphere 612 sky Sphere= new Skysphere("../data/pictures/sky-replace.jpg");613 this->localPlayer->addChild(this->sky Sphere);614 this->spawn(this->sky Sphere);592 sky = new Skysphere("../data/pictures/sky-replace.jpg"); 593 this->localPlayer->addChild(this->sky); 594 this->spawn(this->sky); 615 595 Vector* es = new Vector (20, 0, 0); 616 596 Quaternion* qs = new Quaternion (); … … 655 635 656 636 // Create SkySphere 657 this->sky Sphere= new Skysphere("../data/pictures/sky-replace.jpg");658 this->sky Sphere->setName("SkySphere");659 this->spawn(this->sky Sphere);660 this->localCamera->addChild(this->sky Sphere);661 this->sky Sphere->setMode(PNODE_MOVEMENT);637 this->sky = new Skysphere("../data/pictures/sky-replace.jpg"); 638 this->sky->setName("SkySphere"); 639 this->spawn(this->sky); 640 this->localCamera->addChild(this->sky); 641 this->sky->setMode(PNODE_MOVEMENT); 662 642 /*monitor progress*/ 663 643 this->glmis->step(); -
orxonox/trunk/src/story_entities/world.h
r4010 r4015 19 19 class PNode; 20 20 class GLMenuImageScreen; 21 class Skysphere;22 class SkyBox;23 21 class LightManager; 24 22 class Terrain; … … 110 108 TrackManager* trackManager; //!< The reference of the TrackManager that handles the course through the Level. 111 109 Camera* localCamera; //!< The current Camera 112 Skysphere* skySphere; //!< The Environmental Heaven of orxonox \todo insert this to environment insted 113 SkyBox* skyBox; 110 WorldEntity* sky; //!< The Environmental Heaven of orxonox \todo insert this to environment insted 114 111 LightManager* lightMan; //!< The Lights of the Level 115 112 Terrain* terrain; //!< The Terrain of the World.
Note: See TracChangeset
for help on using the changeset viewer.