Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2008, 5:30:39 PM (16 years ago)
Author:
polakma
Message:

fixed projectile, particle effect, reloadingTimer and magazineTimer

Location:
code/branches/weapon2/src/orxonox/objects/weaponSystem/projectiles
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/projectiles/BillboardProjectile.cc

    r2367 r2391  
    4545        assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity
    4646
    47         this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
    48         //this->attachObject(this->billboard_.getBillboardSet());
    49         this->scale(0.5);
     47        this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5, 0.5, 0.7, 0.8), 1);
     48        this->getNode()->attachObject(this->billboard_.getBillboardSet());
     49        this->scale(0.2);
    5050    }
    5151
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/projectiles/ParticleProjectile.cc

    r2368 r2391  
    4343        RegisterObject(ParticleProjectile);
    4444
    45         this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot2", LODParticle::normal);
     45        this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot2_small", LODParticle::normal);
    4646        this->particles_->addToSceneNode(this->getNode());
    47         this->particles_->setKeepParticlesInLocalSpace(true);
     47        //this->particles_->setKeepParticlesInLocalSpace(true);
    4848
     49        this->particles_->getAllEmitters()->setDirection(-WorldEntity::FRONT);
    4950        /*
    5051        if (this->owner_)
     
    7677        this->particles_->setEnabled(this->isVisible());
    7778    }
    78 
    79     bool ParticleProjectile::create(){
    80       if(!Projectile::create())
    81         return false;
    82       this->particles_->getAllEmitters()->setDirection(-this->getOrientation()*Vector3(1,0,0));
    83       return true;
    84     }
    8579}
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/projectiles/ParticleProjectile.h

    r2272 r2391  
    4646            void setConfigValues();
    4747
    48             virtual bool create();
    49 
    5048        private:
    5149            ParticleInterface* particles_;
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/projectiles/Projectile.cc

    r2379 r2391  
    4848        RegisterObject(Projectile);
    4949
     50COUT(0) << "Projectile::Projectile" << std::endl;
     51
    5052        this->setConfigValues();
    5153        this->explosionTemplateName_ = "Orxonox/explosion3";
     
    5355
    5456        //this->setStatic(false);
    55         this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL);
     57//        this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL);
    5658
    5759        /*
     
    121123        delete this;
    122124    }
    123 
    124     bool Projectile::create(){
    125       return WorldEntity::create();
    126     }
    127125}
  • code/branches/weapon2/src/orxonox/objects/weaponSystem/projectiles/Projectile.h

    r2272 r2391  
    4545            virtual void tick(float dt);
    4646
    47             virtual bool create();
    48 
    4947        protected:
    5048            Projectile(BaseObject* creator);
Note: See TracChangeset for help on using the changeset viewer.