- Timestamp:
- Oct 29, 2015, 8:02:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/LeaderController.h
r10718 r10719 35 35 36 36 #include "util/Math.h" 37 #include "tools/Timer.h" 38 #include "tools/interfaces/Tickable.h" 37 39 38 40 39 namespace orxonox 41 40 { 42 class _OrxonoxExport LeaderController : public CommonController , virtual public Tickable41 class _OrxonoxExport LeaderController : public CommonController 43 42 { 44 43 public: 45 44 static const int RADIUS_TO_SEARCH_FOR_LEADER = 3000; 45 46 46 LeaderController(Context* context); 47 47 virtual ~LeaderController(); 48 virtual bool isLeader(); 48 virtual bool isLeader() 49 { 50 return true; 51 } 52 bool bIsDivisionLeader_; 53 virtual bool setFollower(LeaderController* myFollower) 54 { 55 return false; 56 }; 49 57 50 virtual bool setWingman(WingmanController* wingman);51 virtual void tick(float dt); //<! Carrying out the targets set in action().52 58 53 59 protected: 54 60 55 LeaderController* findNewDivisionLeader();56 61 57 bool bIsDivisionLeader_;58 62 59 virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour ~ setting targets.60 63 //void defaultBehaviour(float maxrand); //<! Helper function for code reusage. Some concrete commands for a bot. 61 64 … … 64 67 WeakPtr<Pawn> target_; 65 68 66 WingmanController* myWingman_; 67 LeaderController* myDivisionLeader_; 69 68 70 //Timer actionTimer_; //<! Regularly calls action(). 69 71
Note: See TracChangeset
for help on using the changeset viewer.