Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10349 in orxonox.OLD for branches/ai/src/world_entities


Ignore:
Timestamp:
Jan 24, 2007, 6:55:21 PM (18 years ago)
Author:
tfahrni
Message:
 
Location:
branches/ai/src/world_entities/npcs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/ai/src/world_entities/npcs/npc.cc

    r10275 r10349  
    5555  std::cout << "Swarm Number:" << swarmNumber << "\n";
    5656
    57   AIEngine::getInstance()->addAI(teamNumber,swarmNumber,(WorldEntity*)this);
     57  AIEngine::getInstance()->addAI(teamNumber,swarmNumber,(WorldEntity*)this,maxSpeed,attackDistance);
    5858
    5959  this->bFire = false;
     
    132132  LoadParam(root, "swarm", this, NPC, setSwarmNumber)
    133133  .describe("this sets the swarm number")
     134  .defaultValues(0);
     135
     136  LoadParam(root, "maxSpeed", this, NPC, setMaxSpeed)
     137  .describe("this sets the NPC max Speed")
     138  .defaultValues(0);
     139
     140  LoadParam(root, "attackDistance", this, NPC, setAttackDistance)
     141  .describe("this sets the NPC distance to target")
    134142  .defaultValues(0);
    135143}
  • branches/ai/src/world_entities/npcs/npc.h

    r10275 r10349  
    3636  inline void setTeamNumber(int number) { teamNumber=number; }
    3737  inline void setSwarmNumber(int number) { swarmNumber=number; }
    38 
     38  inline void setMaxSpeed(float number) { maxSpeed=number; }
     39  inline void setAttackDistance(float number) { attackDistance=number; }
    3940
    4041 private:
     
    4344  int                   swarmNumber;  //!< number of the swarm
    4445  int                   difficulty;   //!< difficulty
     46  float                                         maxSpeed;
     47  float                                         attackDistance;
    4548
    4649  WeaponManager         weaponMan;    //!< weapon manager
Note: See TracChangeset for help on using the changeset viewer.