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/DivisionController.h

    r10718 r10719  
    3939namespace orxonox
    4040{
    41     class _OrxonoxExport DivisionController : public LeaderController
     41    class _OrxonoxExport DivisionController : public LeaderController, public Tickable
    4242      {
    4343        public:
     
    4545                virtual ~DivisionController();
    4646
    47                 //virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     47                virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4848
    4949                //Using british military aircraft formations
     
    5353                        { return this->formationMode_; }
    5454                        virtual bool setFollower(LeaderController* myFollower);
     55                        virtual bool setWingman(CommonController* wingman)
     56            {
     57                if (!this->myWingman_)
     58                {
     59                    this->myWingman_ = wingman;
     60                    return true;
     61                }
     62                else
     63                {
     64                    return false;
     65                }
     66            };
     67            virtual void tick(float dt); //<! Carrying out the targets set in action().
    5568
    5669                       
     
    6679                        FormationMode formationMode_;
    6780                       
    68                        
     81                        CommonController* myWingman_;
    6982                LeaderController* myFollower_;
    7083               
Note: See TracChangeset for help on using the changeset viewer.