Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2015, 8:02:23 PM (10 years ago)
Author:
gania
Message:

All compiling, WingmanControllers actually find LeaderControllers and connect to them, SectionControllers find DivisionControllers and connect. TODO write tick functions, helper functions to CommonController

File:
1 edited

Legend:

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

    r10718 r10719  
    3535
    3636#include "util/Math.h"
    37 #include "tools/Timer.h"
    38 #include "tools/interfaces/Tickable.h"
     37
    3938
    4039namespace orxonox
    4140{
    42     class _OrxonoxExport LeaderController : public CommonController,  virtual public Tickable
     41    class _OrxonoxExport LeaderController : public CommonController
    4342    {
    4443        public:
    45            
     44               static const int RADIUS_TO_SEARCH_FOR_LEADER = 3000;
     45
    4646            LeaderController(Context* context);
    4747            virtual ~LeaderController();
    48             virtual bool isLeader();
     48            virtual bool isLeader()
     49            {
     50                return true;
     51            }
     52            bool bIsDivisionLeader_;
     53            virtual bool setFollower(LeaderController* myFollower)
     54            {
     55                return false;
     56            };
    4957
    50             virtual bool setWingman(WingmanController* wingman);
    51             virtual void tick(float dt); //<! Carrying out the targets set in action().
    5258
    5359        protected:
    5460           
    55             LeaderController* findNewDivisionLeader();
    5661
    57             bool bIsDivisionLeader_;
    5862
    59             virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
    6063            //void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot.   
    6164         
     
    6467            WeakPtr<Pawn> target_;
    6568           
    66             WingmanController* myWingman_;
    67             LeaderController* myDivisionLeader_;
     69           
    6870            //Timer actionTimer_; //<! Regularly calls action().
    6971               
Note: See TracChangeset for help on using the changeset viewer.