Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4977 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Aug 10, 2005, 11:26:59 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: removed the WorldInterface, as its job is already been taken by state.h
also removed some totally obsolete but very cool functions of NPC

Location:
orxonox/trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/npc.cc

    r4976 r4977  
    1616*/
    1717
    18 #include <iostream>
    19 #include <GL/glut.h>
    2018
    21 #include "ai.h"
     19//#include "ai.h"
    2220
    2321#include "npc.h"
     
    2927{
    3028  this->setClassID(CL_NPC, "NPC");
    31   hasDied = 0;
    3229
    3330  this->loadModel("models/bolido.obj");
     
    3532
    3633NPC::~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 }
    6034
    6135
     
    7145void NPC::die()
    7246{
    73   hasDied = 1;
    7447}
  • orxonox/trunk/src/world_entities/npc.h

    r4746 r4977  
    1313  ~NPC ();
    1414
    15   /* collision control */
    16   float collisionRadius;
    1715
    18   float xCor;
    19   float yCor;
    20   float zCor;
     16  void addAI(AI* ai);
    2117
    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();
    2918  int hit();
    3019  void die();
     
    3221 private:
    3322  /* position of the non player space craft */
    34 
    35   int npcType;
    36   int hasDied;
    37 
    38 
    3923;
    4024
Note: See TracChangeset for help on using the changeset viewer.