Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2015, 11:53:45 AM (9 years ago)
Author:
gania
Message:

Wingmen and Leaders look for their leaders

File:
1 edited

Legend:

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

    r10709 r10717  
    3030#define _LeaderController_H__
    3131
     32#include "controllers/CommonController.h"
    3233#include "controllers/WingmanController.h"
    3334
    3435
    35 
     36#include "util/Math.h"
     37#include "tools/Timer.h"
     38#include "tools/interfaces/Tickable.h"
    3639
    3740namespace orxonox
    3841{
    39     class _OrxonoxExport LeaderController : public WingmanController
     42    class _OrxonoxExport LeaderController : public CommonController, public Tickable
    4043    {
    4144        public:
     
    4346            LeaderController(Context* context);
    4447            virtual ~LeaderController();
    45             virtual void setWingman(WingmanController* wingman);
     48            virtual bool isLeader();
     49
     50            virtual bool setWingman(WingmanController* wingman);
    4651            virtual void tick(float dt); //<! Carrying out the targets set in action().
    4752
    4853        protected:
    4954           
    50            
     55            LeaderController* findNewDivisionLeader();
     56
     57            bool bIsDivisionLeader_;
    5158
    5259            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
     
    5764            WeakPtr<Pawn> target_;
    5865           
    59             WingmanController* wingman_;
    60 
     66            WingmanController* myWingman_;
     67            LeaderController* myDivisionLeader_;
    6168            //Timer actionTimer_; //<! Regularly calls action().
    6269               
Note: See TracChangeset for help on using the changeset viewer.