- Timestamp:
- Oct 26, 2015, 5:44:31 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/LeaderController.h
r10682 r10709 30 30 #define _LeaderController_H__ 31 31 32 #include "SectionController.h" 32 #include "controllers/WingmanController.h" 33 34 33 35 34 36 35 37 namespace orxonox 36 38 { 37 class _OrxonoxExport LeaderController : public SectionController, public Tickable39 class _OrxonoxExport LeaderController : public WingmanController 38 40 { 39 41 public: … … 41 43 LeaderController(Context* context); 42 44 virtual ~LeaderController(); 43 45 virtual void setWingman(WingmanController* wingman); 44 46 virtual void tick(float dt); //<! Carrying out the targets set in action(). 45 47 46 48 protected: 47 49 48 enum Mode {KEEPFORMATION, ROCKET, KILLENEMY}; 49 Mode mode_; 50 50 51 51 52 virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets. 52 53 //void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot. 54 55 private: 53 56 57 WeakPtr<Pawn> target_; 58 59 WingmanController* wingman_; 54 60 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(). 69 62 70 63 };
Note: See TracChangeset
for help on using the changeset viewer.