- Timestamp:
- Nov 28, 2015, 10:30:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.h
r10877 r10885 21 21 * 22 22 * Author: 23 * Fabian 'x3n' Landau23 * Gani Aliguzhinov 24 24 * Co-authors: 25 25 * ... … … 55 55 { 56 56 public: 57 //----[language demanded functions]---- 58 ActionpointController(Context* context); 59 virtual ~ActionpointController(); 60 //----[language demanded functions]---- 61 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 57 ActionpointController(Context* context); 58 virtual ~ActionpointController(); 59 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 62 60 63 virtual void tick(float dt); 61 virtual void tick(float dt); 62 64 63 void addActionpoint(WorldEntity* waypoint); 65 64 WorldEntity* getActionpoint(unsigned int index) const; 66 65 virtual void stayNearProtect(); 67 66 virtual void action(); //<! action() is called in regular intervals managing the bot's behaviour. 68 virtual void takeActionpoints (std::vector<Point > vector, std::vector<Point > loop, bool b); 69 Action::Value getAction (); 70 std::string getActionName(); 67 virtual void takeActionpoints (const std::vector<Point>& vector, const std::vector<Point>& loop, bool b); 68 69 virtual Action::Value getAction (); 70 virtual std::string getActionName(); 71 71 72 72 void setAction (Action::Value action); … … 83 83 virtual bool hasFollower() 84 84 { return true; } 85 85 86 86 protected: 87 void startAttackingEnemiesThatAreClose(); 88 87 void startAttackingEnemiesThatAreClose(); 88 WeakPtr<ActionpointController> myWingman_; 89 WeakPtr<ActionpointController> myFollower_; 90 WeakPtr<ActionpointController> myDivisionLeader_; 89 91 //----[Actionpoint information]---- 90 92 Action::Value action_; … … 103 105 ControllableEntity* getProtect (); 104 106 WeakPtr<ControllableEntity> protect_; 105 107 void fillLoop(); 108 void fillLoopReversed(); 109 void moveBackToTop(); 106 110 void setClosestTarget(); 107 111 Pawn* closestTarget(); … … 109 113 void executeActionpoint(); 110 114 void nextActionpoint(); 111 void fillLoop(); 112 void fillLoopReversed(); 113 void moveBackToTop(); 115 void pushAction(Point& p); 116 void popAction(); 114 117 //----[Actionpoint methods]---- 115 118 bool bFirstTick_;
Note: See TracChangeset
for help on using the changeset viewer.