Changeset 2493 for code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/BillboardProjectile.cc
- Timestamp:
- Dec 17, 2008, 2:10:11 AM (15 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
/code/branches/weapon2 (added) merged: 2108,2145,2186,2203,2232,2272-2273,2288,2308,2319,2327,2331,2337,2347,2354,2366-2368,2379,2391,2393,2398,2410
- Property svn:mergeinfo changed
-
code/branches/presentation/src/orxonox/objects/weaponSystem/projectiles/BillboardProjectile.cc
r2099 r2493 30 30 #include "BillboardProjectile.h" 31 31 32 #include <OgreBillboard .h>32 #include <OgreBillboardSet.h> 33 33 34 34 #include "core/CoreIncludes.h" 35 #include "objects/Scene.h" 35 36 36 37 namespace orxonox … … 38 39 CreateFactory(BillboardProjectile); 39 40 40 BillboardProjectile::BillboardProjectile(BaseObject* creator , Weapon* owner) : Projectile(creator, owner)41 BillboardProjectile::BillboardProjectile(BaseObject* creator) : Projectile(creator) 41 42 { 42 43 RegisterObject(BillboardProjectile); 43 44 44 this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1); 45 this->attachObject(this->billboard_.getBillboardSet()); 46 this->scale(0.5); 45 assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity 46 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); 47 50 } 48 51 49 52 BillboardProjectile::~BillboardProjectile() 50 53 { 51 if (this->isInitialized() && this->owner_)52 this->detachObject(this->billboard_.getBillboardSet());54 //if (this->isInitialized() && this->owner_) 55 //this->detachObject(this->billboard_.getBillboardSet()); 53 56 } 54 57 55 58 void BillboardProjectile::setColour(const ColourValue& colour) 56 59 { 57 this->billboard_. getBillboardSet()->getBillboard(0)->setColour(colour);60 this->billboard_.setColour(colour); 58 61 } 59 62
Note: See TracChangeset
for help on using the changeset viewer.