- Timestamp:
- May 31, 2010, 6:18:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/controllers/ArtificialController.h
r7034 r7066 54 54 inline int getTeam() const 55 55 { return this->team_; } 56 56 57 inline void setFormationFlight(bool formation) 57 58 { this->formationFlight_ = formation; } 58 59 inline bool getFormationFlight() const 59 60 { return this->formationFlight_; } 61 60 62 inline void setFormationSize(int size) 61 63 { this->maxFormationSize_ = size; } 62 64 inline int getFormationSize() const 63 65 { return this->maxFormationSize_; } 66 64 67 virtual void changedControllableEntity(); 65 68 66 static void formationflight( bool form);67 static void masteraction( int action);69 static void formationflight(const bool form); 70 static void masteraction(const int action); 68 71 static void followme(); 69 static void passivebehaviour( bool passive);70 static void formationsize( int size);72 static void passivebehaviour(const bool passive); 73 static void formationsize(const int size); 71 74 72 75 protected: … … 81 84 std::vector<ArtificialController*> slaves_; 82 85 ArtificialController *myMaster_; 83 enum SpecificMasterAction {NONE, HOLD, SPIN, TURN180, FOLLOW HUMAN};86 enum SpecificMasterAction {NONE, HOLD, SPIN, TURN180, FOLLOW}; 84 87 SpecificMasterAction specificMasterAction_; 85 88 int specificMasterActionHoldCount_; 86 Pawn* humanToFollow_; 87 88 void targetDied(); 89 float speedCounter_; //for speed adjustment when following 89 90 90 91 void moveToPosition(const Vector3& target); 91 92 void moveToTargetPosition(); 92 93 int getState();94 93 95 94 void unregisterSlave(); … … 109 108 void spinInit(); 110 109 void spin(); 111 void followHumanInit(Pawn* human, bool always); 110 void followInit(Pawn* pawn, const bool always = false, const int secondsToFollow = 100); 111 void followRandomHumanInit(); 112 112 void follow(); 113 void followForSlaves(const Vector3& target); 113 114 114 115 void setTargetPosition(const Vector3& target); … … 122 123 bool isCloseAtTarget(float distance) const; 123 124 bool isLookingAtTarget(float angle) const; 125 126 void targetDied(); 124 127 125 128 static bool sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype); // hack
Note: See TracChangeset
for help on using the changeset viewer.