Changeset 9173 in orxonox.OLD for branches/presentation/src/world_entities/npcs/attractor_mine.cc
- Timestamp:
- Jul 4, 2006, 9:57:33 PM (18 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/npcs/attractor_mine.cc
r9172 r9173 18 18 19 19 20 #include " npc_test.h"21 #include "obb_tree.h" 20 #include "attractor_mine.h" 21 22 22 23 23 #include "shader.h" … … 30 30 #include "effects/explosion.h" 31 31 32 CREATE_FACTORY( NPC2, CL_NPC_TEST2);32 CREATE_FACTORY(AttractorMine, CL_ATTRACTOR_MINE); 33 33 34 34 35 NPC2::NPC2(const TiXmlElement* root)35 AttractorMine::AttractorMine(const TiXmlElement* root) 36 36 : NPC(NULL) 37 37 { 38 this->setClassID(CL_ NPC_TEST2, "NPC2");38 this->setClassID(CL_ATTRACTOR_MINE, "AttractorMine"); 39 39 40 40 if ((float)rand()/RAND_MAX > .5f) … … 57 57 58 58 59 NPC2::~NPC2()59 AttractorMine::~AttractorMine () 60 60 { 61 61 if (this->shader) … … 64 64 65 65 66 void NPC2::loadParams(const TiXmlElement* root)66 void AttractorMine::loadParams(const TiXmlElement* root) 67 67 { 68 68 NPC::loadParams(root); … … 71 71 72 72 73 void NPC2::destroy(WorldEntity* killer)73 void AttractorMine::destroy(WorldEntity* killer) 74 74 { 75 75 Explosion::explode(this, Vector(10,10,10)); … … 86 86 * Just override this function with whatever you want to be drawn. 87 87 */ 88 void NPC2::draw() const88 void AttractorMine::draw() const 89 89 { 90 90 glMatrixMode(GL_MODELVIEW); … … 113 113 114 114 115 void NPC2::tick(float dt)115 void AttractorMine::tick(float dt) 116 116 { 117 117 // Vector direction = (State::getCameraTarget()->getAbsCoor() - this->getAbsCoor()); … … 119 119 //if (directin.len() < 100) 120 120 // this->shiftCoor(direction *dt * 5 * exp(-direction.len() / 30.0)); 121 this->shiftDir(Quaternion(dt, this->randomRotAxis));121 // this->shiftDir(Quaternion(dt, this->randomRotAxis)); 122 122 123 123 }
Note: See TracChangeset
for help on using the changeset viewer.