Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 26, 2015, 5:44:31 PM (9 years ago)
Author:
gania
Message:

Restructured

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/AI_HS15/src/orxonox/controllers/LeaderController.cc

    r10682 r10709  
    3333namespace orxonox
    3434{
    35     const float LeaderController::ACTION_INTERVAL = 1.0f;
    3635
    3736    RegisterClass(LeaderController);
    3837
    39     LeaderController::LeaderController(Context* context) : SectionController(context)
     38    LeaderController::LeaderController(Context* context) : WingmanController(context)
    4039    {
     40
    4141        RegisterObject(LeaderController);
    42         this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&LeaderController::action, this)));
     42        //this->actionTimer_.setTimer(ACTION_INTERVAL, true, createExecutor(createFunctor(&LeaderController::action, this)));
    4343    }
     44
    4445
    4546    LeaderController::~LeaderController()
     
    4950    void LeaderController::action()
    5051    {
    51        
     52        //this->target_ = this->sectionTarget_;       
    5253    }
    5354    /*
     
    6667    */
    6768    void LeaderController::tick(float dt)
    68     {
     69    {/*
    6970        if (!this->isActive())
    7071            return;
    7172       
    7273        //--------------------------Stay in division--------------------------
    73         this->keepDivisionTick();
     74        this->keepDivisionTick();*/
    7475        /*keepDivisionTick(){
    7576            if (this->divisionLeader_ && this->divisionLeader_->getControllableEntity() && desiredRelativePosition_){
     
    8081        }
    8182        */
    82         //If ordered to attack -> follow target and shoot
     83        /*//If ordered to attack -> follow target and shoot
    8384        if (this->bAttackOrder_)
    8485        {
    85 
     86 
    8687        }
    8788        //If ordered to move -> move to a target Point
    88         else if (this->bMoveOrder_)
    89         {
    90 
    91         }
    92         else
     89       
    9390        //No orders -> Don't move, but shoot at whatever is close, unless Boss is shooting at it.
    9491        //(Section shoots same target, Boss's section shoots another target)
    9592        {
    9693
    97         }
     94        }*/
    9895
    99 
     96        orxout(internal_error) << "my Wingman is " << this->wingman_ << endl;
     97       
    10098        SUPER(LeaderController, tick, dt);
     99    }
     100    void LeaderController::setWingman(WingmanController* wingman)
     101    {
     102        this->wingman_ = wingman;
    101103    }
    102104//**********************************************NEW
Note: See TracChangeset for help on using the changeset viewer.