Changeset 4977 in orxonox.OLD for orxonox/trunk/src/world_entities
- Timestamp:
- Aug 10, 2005, 11:26:59 AM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/npc.cc
r4976 r4977 16 16 */ 17 17 18 #include <iostream>19 #include <GL/glut.h>20 18 21 #include "ai.h"19 //#include "ai.h" 22 20 23 21 #include "npc.h" … … 29 27 { 30 28 this->setClassID(CL_NPC, "NPC"); 31 hasDied = 0;32 29 33 30 this->loadModel("models/bolido.obj"); … … 35 32 36 33 NPC::~NPC () {} 37 38 39 void NPC::setPosition(float x, float y, float z)40 {41 xCor = x; yCor = y; zCor = z;42 }43 44 void NPC::getPosition(float* x, float* y, float* z)45 {46 *x = xCor;47 *y = yCor;48 *z = zCor;49 }50 51 void NPC::setCollisionRadius(float r)52 {53 collisionRadius = r;54 }55 56 float NPC::getCollisionRadius()57 {58 return collisionRadius;59 }60 34 61 35 … … 71 45 void NPC::die() 72 46 { 73 hasDied = 1;74 47 } -
orxonox/trunk/src/world_entities/npc.h
r4746 r4977 13 13 ~NPC (); 14 14 15 /* collision control */16 float collisionRadius;17 15 18 float xCor; 19 float yCor; 20 float zCor; 16 void addAI(AI* ai); 21 17 22 void drawNPC();23 void paint();24 void setPosition(float x, float y, float z);25 void getPosition(float* x, float* y, float* z);26 void addAI(AI* ai);27 void setCollisionRadius(float r);28 float getCollisionRadius();29 18 int hit(); 30 19 void die(); … … 32 21 private: 33 22 /* position of the non player space craft */ 34 35 int npcType;36 int hasDied;37 38 39 23 ; 40 24
Note: See TracChangeset
for help on using the changeset viewer.