Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 23, 2015, 7:44:20 AM (9 years ago)
Author:
gania
Message:

refactoring in process

File:
1 edited

Legend:

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

    r10678 r10681  
    3838    {
    3939        public:
    40         LeaderController(Context* context);
    41         virtual ~LeaderController();
     40           
     41            LeaderController(Context* context);
     42            virtual ~LeaderController();
    4243
    43         virtual void tick(float dt); //<! Carrying out the targets set in action().
     44            virtual void tick(float dt); //<! Carrying out the targets set in action().
    4445
    4546        protected:
    46         virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
    47         void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot.
     47           
     48            virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.
     49            //void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot.
     50
     51
     52           
     53               
     54            enum Mode {KEEPFORMATION, ROCKET, KILLENEMY};
     55            Mode mode_;
     56
     57            //WEAPONSYSTEM DATA
     58            std::map<std::string, int> weaponModes_; //<! Links each "weapon" to it's weaponmode - managed by setupWeapons()
     59            //std::vector<int> projectiles_; //<! Displays amount of projectiles of each weapon. - managed by setupWeapons()
     60            float timeout_; //<! Timeout for rocket usage. (If a rocket misses, a bot should stop using it.)
     61            void setupWeapons(); //<! Defines which weapons are available for a bot. Is recalled whenever a bot was killed.
     62            bool bSetupWorked; //<! If false, setupWeapons() is called.
     63            int getFiremode(std::string name);
     64
     65            void boostControl(); //<! Sets and resets the boost parameter of the spaceship. Bots alternate between boosting and saving boost.
    4866
    4967        private:
    50         static const float ACTION_INTERVAL;
     68            static const float ACTION_INTERVAL;
    5169
    52         Timer actionTimer_; //<! Regularly calls action().
    53            
     70            Timer actionTimer_; //<! Regularly calls action().
     71              
    5472    };
    5573}
Note: See TracChangeset for help on using the changeset viewer.