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

    r10682 r10709  
    3030#define _LeaderController_H__
    3131
    32 #include "SectionController.h"
     32#include "controllers/WingmanController.h"
     33
     34
    3335
    3436
    3537namespace orxonox
    3638{
    37     class _OrxonoxExport LeaderController : public SectionController, public Tickable
     39    class _OrxonoxExport LeaderController : public WingmanController
    3840    {
    3941        public:
     
    4143            LeaderController(Context* context);
    4244            virtual ~LeaderController();
    43 
     45            virtual void setWingman(WingmanController* wingman);
    4446            virtual void tick(float dt); //<! Carrying out the targets set in action().
    4547
    4648        protected:
    4749           
    48             enum Mode {KEEPFORMATION, ROCKET, KILLENEMY};
    49             Mode mode_;
     50           
    5051
    5152            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
    5253            //void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot.   
     54         
     55        private:
    5356           
     57            WeakPtr<Pawn> target_;
     58           
     59            WingmanController* wingman_;
    5460
    55             //WEAPONSYSTEM DATA
    56             std::map<std::string, int> weaponModes_; //<! Links each "weapon" to it's weaponmode - managed by setupWeapons()
    57             //std::vector<int> projectiles_; //<! Displays amount of projectiles of each weapon. - managed by setupWeapons()
    58             float timeout_; //<! Timeout for rocket usage. (If a rocket misses, a bot should stop using it.)
    59             void setupWeapons(); //<! Defines which weapons are available for a bot. Is recalled whenever a bot was killed.
    60             bool bSetupWorked; //<! If false, setupWeapons() is called.
    61             int getFiremode(std::string name);
    62 
    63             void boostControl(); //<! Sets and resets the boost parameter of the spaceship. Bots alternate between boosting and saving boost.
    64 
    65         private:
    66             static const float ACTION_INTERVAL;
    67 
    68             Timer actionTimer_; //<! Regularly calls action().
     61            //Timer actionTimer_; //<! Regularly calls action().
    6962               
    7063    };
Note: See TracChangeset for help on using the changeset viewer.