Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

startet to implement swarming

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
Note: See TracChangeset for help on using the changeset viewer.