- Timestamp:
- Oct 31, 2015, 4:07:29 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/CommonController.h
r10729 r10731 33 33 #include "controllers/Controller.h" 34 34 #include "worldentities/ControllableEntity.h" 35 #include "worldentities/pawns/Pawn.h" 36 35 37 36 38 namespace orxonox … … 39 41 { 40 42 public: 43 41 44 static const float ACTION_INTERVAL = 1.0f; 42 45 43 enum FormationMode {VEE,FINGER4,DIAMOND, WALL}; 46 47 CommonController(Context* context); 48 virtual ~CommonController(); 49 50 51 52 enum FormationMode { VEE, FINGER4, DIAMOND, WALL }; 44 53 virtual void setFormationMode(FormationMode val) 45 54 { this->formationMode_ = val; } … … 47 56 { return this->formationMode_; } 48 57 49 CommonController(Context* context); 50 virtual ~CommonController(); 51 virtual bool isLeader(); 58 enum Rank { NONE, SECTIONLEADER, DIVISIONLEADER, WINGMAN }; 59 virtual void setRank(Rank val) 60 { this->rank_ = val; } 61 inline Rank getRank() const 62 { return this->rank_; } 63 64 65 66 52 67 virtual bool setWingman(CommonController* wingman); 53 68 virtual bool hasWingman(); … … 58 73 void setTargetPosition(const Vector3& target); 59 74 75 /*void spin(); 76 void turn180();*/ 77 78 60 79 protected: 80 61 81 void moveToPosition(const Vector3& target); 62 v irtual void positionReached() {}82 void moveToTargetPosition(); 63 83 64 65 void moveToTargetPosition(); 84 66 85 void copyOrientation(const Quaternion& orient); 67 86 void copyTargetOrientation(); 68 87 88 void doFire(); 89 void aimAtTarget(); 90 bool isLookingAtTarget(float angle) const; 69 91 70 92 bool bHasTargetPosition_; … … 73 95 Quaternion targetOrientation_; 74 96 97 75 98 WeakPtr<ControllableEntity> target_; 76 99 bool bShooting_; 77 100 101 78 102 FormationMode formationMode_; 79 103 Rank rank_; 80 104 81 105
Note: See TracChangeset
for help on using the changeset viewer.