Changeset 2497 for code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/BillboardProjectile.cc
- Timestamp:
- Dec 17, 2008, 5:41:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/BillboardProjectile.cc
r2493 r2497 32 32 #include <OgreBillboardSet.h> 33 33 34 #include "core/Core.h" 34 35 #include "core/CoreIncludes.h" 35 36 #include "objects/Scene.h" … … 43 44 RegisterObject(BillboardProjectile); 44 45 45 assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity 46 if (Core::showsGraphics()) 47 { 48 assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity 49 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5, 0.5, 0.7, 0.8), 1); 50 this->attachOgreObject(this->billboard_.getBillboardSet()); 51 } 46 52 47 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(0.5, 0.5, 0.7, 0.8), 1); 48 this->attachOgreObject(this->billboard_.getBillboardSet()); 49 this->scale(0.2); 53 this->setScale(0.2); 50 54 } 51 55 52 56 BillboardProjectile::~BillboardProjectile() 53 57 { 54 //if (this->isInitialized() && this->owner_)55 //this->detachObject(this->billboard_.getBillboardSet());58 if (this->isInitialized() && Core::showsGraphics() && this->billboard_.getBillboardSet()) 59 this->detachOgreObject(this->billboard_.getBillboardSet()); 56 60 } 57 61 … … 64 68 { 65 69 SUPER(BillboardProjectile, changedVisibility); 70 66 71 this->billboard_.setVisible(this->isVisible()); 67 72 }
Note: See TracChangeset
for help on using the changeset viewer.