Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 9, 2005, 4:10:16 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/particleEngine: renders some particles again

Location:
orxonox/branches/particleEngine/src/story_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/particleEngine/src/story_entities/world.cc

    r4105 r4128  
    4040#include "garbage_collector.h"
    4141#include "animation_player.h"
     42#include "particle_engine.h"
    4243
    4344#include "command_node.h"
     
    207208  delete this->lightMan;
    208209  delete this->trackManager;
     210  delete this->particleEngine;
    209211  TextEngine::getInstance()->flush();
    210212
     
    251253  this->garbageCollector = GarbageCollector::getInstance();
    252254
     255  this->particleEngine = ParticleEngine::getInstance();
    253256  this->trackManager = TrackManager::getInstance();
    254257  this->lightMan = LightManager::getInstance();
     
    489492  this->spawn(terrain);
    490493
     494
     495  ParticleSystem* system = new ParticleSystem(1000);
     496  system->setLifeSpan(1);
     497  system->setRadius(2, 0, 2, 0);
     498  ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), 0, 500);
     499  emitter->setParent(this->localPlayer);
     500 
     501  particleEngine->addConnection(emitter, system);
    491502}
    492503
     
    951962
    952963  TextEngine::getInstance()->draw();
     964  particleEngine->draw();
     965
    953966  lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
    954967}
     
    11361149
    11371150      AnimationPlayer::getInstance()->tick(seconds);
     1151      particleEngine->tick(seconds);
    11381152    }
    11391153  this->lastFrame = currentFrame;
  • orxonox/branches/particleEngine/src/story_entities/world.h

    r4015 r4128  
    2020class GLMenuImageScreen;
    2121class LightManager;
     22class ParticleEngine;
    2223class Terrain;
    2324class GarbageCollector;
     
    107108  PNode* nullParent;                  //!< The zero-point, that everything has as its parent.
    108109  TrackManager* trackManager;         //!< The reference of the TrackManager that handles the course through the Level.
     110  ParticleEngine* particleEngine;     //!< The ParticleEngine of the World.
    109111  Camera* localCamera;                //!< The current Camera
    110112  WorldEntity* sky;                   //!< The Environmental Heaven of orxonox \todo insert this to environment insted
Note: See TracChangeset for help on using the changeset viewer.