Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4176 in orxonox.OLD for orxonox/trunk/src/story_entities/world.cc


Ignore:
Timestamp:
May 13, 2005, 11:09:20 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the particleSystem into the Trunk

File:
1 edited

Legend:

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

    r4145 r4176  
    4040#include "garbage_collector.h"
    4141#include "animation_player.h"
     42#include "particle_engine.h"
    4243
    4344#include "command_node.h"
     
    203204  delete this->lightMan;
    204205  delete this->trackManager;
     206  delete this->particleEngine;
    205207  TextEngine::getInstance()->flush();
    206208
     
    246248  this->garbageCollector = GarbageCollector::getInstance();
    247249
     250  this->particleEngine = ParticleEngine::getInstance();
    248251  this->trackManager = TrackManager::getInstance();
    249252  this->lightMan = LightManager::getInstance();
     
    484487  this->spawn(terrain);
    485488
     489
     490  ParticleSystem* system = new ParticleSystem(1000, PARTICLE_SPRITE);
     491  system->setLifeSpan(.5);
     492  system->setConserve(.99);
     493  system->setRadius(2, 0, 2, 0);
     494
     495  ParticleEmitter* emitter = new ParticleEmitter(Vector(-1, 0, 0), M_PI_4, 100, .05);
     496  emitter->setParent(this->localPlayer);
     497 
     498  particleEngine->addConnection(emitter, system);
    486499}
    487500
     
    945958
    946959  TextEngine::getInstance()->draw();
     960  particleEngine->draw(this->dtS); //!< \todo should be dts like in the Trunk;
     961
    947962  lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes //
    948963}
     
    11301145
    11311146      AnimationPlayer::getInstance()->tick(this->dtS);
     1147      particleEngine->tick(this->dtS);
    11321148    }
    11331149  this->lastFrame = currentFrame;
Note: See TracChangeset for help on using the changeset viewer.