- Timestamp:
- Jul 4, 2006, 9:57:33 PM (18 years ago)
- Location:
- branches/presentation/src
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/defs/class_id.h
r9167 r9173 236 236 CL_NPC_TEST2 = 0x00000402, 237 237 CL_GENERIC_NPC = 0x00000403, 238 CL_ATTRACTOR_MINE = 0x00000404, 238 239 239 240 // Testing Entities -
branches/presentation/src/world_entities/WorldEntities.am
r9167 r9173 7 7 world_entities/npcs/door.cc \ 8 8 world_entities/npcs/repair_station.cc \ 9 world_entities/npcs/attractor_mine.cc \ 9 10 \ 10 11 world_entities/environment.cc \ … … 74 75 npcs/ground_turret.h \ 75 76 npcs/door.cc \ 76 npcs/repair_station.cc \ 77 npcs/repair_station.h \ 78 npcs/attractor_mine.h \ 77 79 \ 78 80 environment.h \ -
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 } -
branches/presentation/src/world_entities/npcs/attractor_mine.h
r9172 r9173 1 1 2 #ifndef _ NPC22_H3 #define _ NPC2_H2 #ifndef _ATTRACTOR_MINE_H 3 #define _ATTRACTOR_MINE_H 4 4 5 5 #include "npc.h" … … 8 8 class Shader; 9 9 10 class NPC2: public NPC {10 class AttractorMine : public NPC { 11 11 12 12 public: 13 NPC2(const TiXmlElement* root);14 virtual ~ NPC2();13 AttractorMine (const TiXmlElement* root); 14 virtual ~AttractorMine (); 15 15 16 16 virtual void loadParams(const TiXmlElement* root); … … 28 28 }; 29 29 30 #endif /* _ NPC2_H */30 #endif /* _ATTRACTOR_MINE_H */ -
branches/presentation/src/world_entities/npcs/npc_test.cc
r9171 r9173 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.