Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 31, 2015, 4:07:29 PM (9 years ago)
Author:
gania
Message:

added a little bit of firing functionality

File:
1 edited

Legend:

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

    r10729 r10731  
    4040    {
    4141        public:
     42
    4243            SectionController(Context* context);
    4344            virtual ~SectionController();
    44             virtual bool setWingman(CommonController* cwingman)
    45             {
    46                 WeakPtr<WingmanController> wingman = orxonox_cast<WingmanController*>(cwingman);
     45           
     46            virtual void tick(float dt); //<! Carrying out the targets set in action().
     47           
    4748
    48                 if (!this->myWingman_)
    49                 {
    50                     this->myWingman_ = wingman;
    51                     return true;
    52                 }
    53                 else
    54                 {
    55                     return false;
    56                 }
    57             }
    58 
    59 
    60             virtual bool hasWingman()
    61             {
    62                 if (this->myWingman_)
    63                     return true;
    64                 else
    65                     return false;
    66             }
    67 
    68             virtual void tick(float dt); //<! Carrying out the targets set in action().
    69 
     49            LeaderController* findNewDivisionLeader();
     50            virtual bool setWingman(CommonController* cwingman);
     51            virtual bool hasWingman();
     52           
    7053            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    71             LeaderController* findNewDivisionLeader();
    7254
    7355        protected:
     56
    7457            void setTargetPositionOfWingman();
    75             //A division is the biggest block of spaceships.
    76             //In division one section is leading, the other one always stays on the same position
    77             //relative to the Leader of the leading section.
    78             //In section a Wingman always stays on same position relative to the Leader.
    79             //That position is desiredRelativePosition_
     58           
    8059            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
    8160
     61        private:
    8262
    83            
    84 
    85        
    86         private:
    8763            Timer actionTimer_; //<! Regularly calls action().
    8864           
Note: See TracChangeset for help on using the changeset viewer.