Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4396 in orxonox.OLD for orxonox/trunk/src/story_entities


Ignore:
Timestamp:
May 30, 2005, 3:27:36 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: now Objects should be affected by the PhysicsEngine too

Location:
orxonox/trunk/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r4382 r4396  
    4848#include "graphics_engine.h"
    4949#include "physics_engine.h"
     50#include "fields.h"
    5051
    5152#include "command_node.h"
     
    181182  TextEngine::getInstance()->flush();
    182183  delete AnimationPlayer::getInstance(); // this should be at the end of the unloading sequence.
     184  delete PhysicsEngine::getInstance();
    183185  //delete garbagecollecor
    184186  //delete animator
     
    473475  emitter->setParent(this->localPlayer);
    474476  emitter->setRelCoor(Vector(-3,0,0));
     477
     478  Field* gravity = new Gravity();
     479  gravity->setMagnitude(1000);
     480  //  gravity->setParent(this->localCamera->getTarget());
    475481 
    476482  // Add the Flow from the Emitter into the System
    477483  particleEngine->addConnection(emitter, system);
    478484
     485  new PhysicsConnection(system, gravity);
     486    new PhysicsConnection(this->localPlayer, gravity);
     487 
    479488
    480489  WorldEntity* testEntity = new TestEntity();
     
    10021011      AnimationPlayer::getInstance()->tick(this->dtS);
    10031012
     1013      PhysicsEngine::getInstance()->tick(this->dtS);
     1014
     1015
    10041016      particleEngine->tick(this->dtS);
    10051017      this->garbageCollector->tick(this->dtS);
  • orxonox/trunk/src/story_entities/world.h

    r4338 r4396  
    1616class TrackManager;
    1717class Camera;
     18class Player;
    1819class PNode;
    1920class GLMenuImageScreen;
     
    123124  GLuint objectList;                  //!< temporary: \todo this will be ereased soon
    124125  tList<WorldEntity>* entities;       //!< A template List of all entities. Every moving thing should be included here, and world automatically updates them.
    125   WorldEntity* localPlayer;           //!< The Player, you fly through the level.
     126  Player* localPlayer;                //!< The Player, you fly through the level.
    126127  PilotNode* pilotNode;               //!< THe pilot node to fly with the mouse
    127128
Note: See TracChangeset for help on using the changeset viewer.