Changeset 3729 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- Apr 5, 2005, 11:51:15 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3727 r3729 35 35 #include "track_manager.h" 36 36 #include "garbage_collector.h" 37 #include "simple_animation.h" 37 38 38 39 #include "command_node.h" … … 155 156 delete this->lightMan; 156 157 delete this->trackManager; 158 159 //delete garbagecollecor 160 //delete animator 157 161 } 158 162 … … 188 192 wi->init(this); 189 193 this->garbageCollector = GarbageCollector::getInstance(); 194 this->simpleAnimation = SimpleAnimation::getInstance(); 190 195 } 191 196 … … 394 399 case DEBUG_WORLD_2: 395 400 { 401 lightMan->setAmbientColor(.1,.1,.1); 402 lightMan->addLight(); 396 403 lightMan->setPosition(-5.0, 10.0, -40.0); 397 404 this->nullParent = NullParent::getInstance (); … … 434 441 this->glmis->step(); 435 442 436 437 WorldEntity* env = new Environment(); 438 env->setName ("env"); 439 this->spawn(env); 440 443 444 WorldEntity* a = new Environment(); 445 this->spawn(a, new Vector(200.0, -35.0, 5.0), new Quaternion()); 446 447 WorldEntity* b = new Environment(); 448 this->localPlayer->addChild(b); 449 b->setRelCoor(new Vector(10.0, 0.0, 0.0)); 450 this->spawn(b); 441 451 452 this->simpleAnimation = SimpleAnimation::getInstance(); 453 454 /* 455 frame->position = point; 456 frame->orientation = orientation; 457 frame->time = time; 458 frame->mode = DEFAULT_ANIMATION_MODE; 459 */ 460 461 KeyFrame* f1 = new KeyFrame; 462 f1->position = new Vector(10.0, 1.0, 1.0); 463 f1->direction = new Quaternion(); 464 f1->time = 1.0; 465 f1->mode = LINEAR; 466 467 468 KeyFrame* f2 = new KeyFrame; 469 f2->position = new Vector(10.0, 1.0, -1.0); 470 f2->direction = new Quaternion(); 471 f2->time = 1.0; 472 f2->mode = LINEAR; 473 474 this->simpleAnimation->animatorBegin(); 475 this->simpleAnimation->selectObject(b); 476 this->simpleAnimation->addKeyFrame(f1); 477 this->simpleAnimation->addKeyFrame(f2); 478 this->simpleAnimation->animatorEnd(); 479 480 this->simpleAnimation->start(); 481 442 482 /* 443 483 Vector* es = new Vector (10, 5, 0); … … 850 890 this->localCamera->tick(this->dt); 851 891 this->garbageCollector->tick(seconds); 892 this->simpleAnimation->tick(seconds); 852 893 } 853 894 this->lastFrame = currentFrame;
Note: See TracChangeset
for help on using the changeset viewer.