Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 10, 2008, 1:37:36 AM (16 years ago)
Author:
rgrieder
Message:

merged gui back to trunk.
update the media repository!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/tools/ParticleInterface.cc

    r1563 r1755  
    3939
    4040#include "GraphicsEngine.h"
    41 #include "Orxonox.h"
    4241#include "core/CoreIncludes.h"
    4342#include "util/Convert.h"
     
    5554    this->bEnabled_ = true;
    5655    this->detaillevel_ = (unsigned int)detaillevel;
    57     this->particleSystem_ = GraphicsEngine::getSingleton().getSceneManager()->createParticleSystem("particles" + getConvertedValue<unsigned int, std::string>(ParticleInterface::counter_s++), templateName);
    58     this->particleSystem_->setSpeedFactor(Orxonox::getSingleton()->getTimeFactor());
     56    this->particleSystem_ = GraphicsEngine::getInstance().getLevelSceneManager()->createParticleSystem("particles" + getConvertedValue<unsigned int, std::string>(ParticleInterface::counter_s++), templateName);
     57    //this->particleSystem_->setSpeedFactor(Orxonox::getInstance().getTimeFactor());
     58    this->particleSystem_->setSpeedFactor(1.0f);
    5959
    60     if (GraphicsEngine::getSingleton().getDetailLevelParticle() < (unsigned int)this->detaillevel_)
     60    if (GraphicsEngine::getInstance().getDetailLevelParticle() < (unsigned int)this->detaillevel_)
    6161    {
    6262      this->bVisible_ = false;
     
    7272  {
    7373    this->particleSystem_->removeAllEmitters();
    74     GraphicsEngine::getSingleton().getSceneManager()->destroyParticleSystem(particleSystem_);
     74    GraphicsEngine::getInstance().getLevelSceneManager()->destroyParticleSystem(particleSystem_);
    7575  }
    7676
     
    171171  void ParticleInterface::setSpeedFactor(float factor)
    172172  {
    173     this->particleSystem_->setSpeedFactor(Orxonox::getSingleton()->getTimeFactor() * factor);
     173    //this->particleSystem_->setSpeedFactor(Orxonox::getInstance().getTimeFactor() * factor);
     174    this->particleSystem_->setSpeedFactor(1.0f * factor);
    174175  }
    175176  float ParticleInterface::getSpeedFactor() const
    176177  {
    177     return (this->particleSystem_->getSpeedFactor() / Orxonox::getSingleton()->getTimeFactor());
     178    //return (this->particleSystem_->getSpeedFactor() / Orxonox::getInstance().getTimeFactor());
     179    return (this->particleSystem_->getSpeedFactor() / 1.0f);
    178180  }
    179181
Note: See TracChangeset for help on using the changeset viewer.