Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Dec 21, 2006, 10:14:15 PM (18 years ago)
Author:
tfahrni
Message:

startet to implement swarming

Location:
branches/ai/src/world_entities
Files:
4 edited

Legend:

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

    r10041 r10138  
    44
    55#include "world_entity.h"
    6 #include "ai_team_member.h"
    76
    87class AI;
    98
    10 class NPC : public AITeamMember {
     9class NPC : public WorldEntity {
    1110  ObjectListDeclaration(NPC);
    1211 public:
  • branches/ai/src/world_entities/npcs/npc_test.cc

    r10135 r10138  
    5151        std::cout << "Team Number: " << teamNumber << "\n";
    5252        std::cout << "Swarm Number:" << swarmNumber << "\n";
    53 
    54         AITeam* myTeam=AIEngine::getInstance()->getCreateTeam(teamNumber);
    55         //std::cout << "Testpoint 4: " << myTeam << "\n";
    56         AISwarm* mySwarm=myTeam->getCreateSwarm(swarmNumber);
    57         //std::cout << "Testpoint 5: " << mySwarm << "\n";
    58         mySwarm->addToSwarm(new MovementModule(this));
    59 
     53        aiModule=new MovementModule(this);
     54        AIEngine::getInstance()->addAI(teamNumber,swarmNumber,aiModule);
    6055}
    6156
    62 
     57NPC2::~NPC2()
     58{
     59        AIEngine::getInstance()->removeAI(teamNumber,swarmNumber,aiModule);
     60}
    6361
    6462void NPC2::loadParams(const TiXmlElement* root)
  • branches/ai/src/world_entities/npcs/npc_test.h

    r10135 r10138  
    1515        public:
    1616                NPC2 (const TiXmlElement* root);
    17                 virtual ~NPC2 (){};
     17                virtual ~NPC2 ();
    1818                virtual void loadParams(const TiXmlElement* root);
    1919                virtual void tick(float dt);
     20                inline int getTeam(){return teamNumber;}
    2021
    2122
  • branches/ai/src/world_entities/space_ships/spacecraft_2d.cc

    r9947 r10138  
    151151  this->travelNode = new PNode();
    152152
    153   this->loadModel("models/ships/mantawing.obj", 5.0f);
     153  this->loadModel("models/ships/mantawing.obj", 2.5f);
    154154
    155155  // camera - issue
Note: See TracChangeset for help on using the changeset viewer.