- Timestamp:
- Nov 14, 2015, 10:09:41 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/AI_HS15/src/orxonox/controllers/CommonController.h
r10800 r10803 81 81 82 82 public: 83 static const float hardcoded_projectile_speed = 750;83 static const float hardcoded_projectile_speed = 750; 84 84 85 static const float ACTION_INTERVAL = 2.0f;85 static const float ACTION_INTERVAL = 1.0f; 86 86 87 87 … … 114 114 void setTarget(ControllableEntity* target); 115 115 bool hasTarget(); 116 ControllableEntity* getTarget(); 116 117 void setTargetOrientation(const Quaternion& orient); 117 118 void setTargetOrientation(ControllableEntity* target); … … 123 124 124 125 protected: 125 126 void dodge(Vector3& thisPosition, Vector3& diffUnit); 127 int counter; 126 128 void moveToPoint(const Vector3& relativeTargetPosition, float angleRoll); 127 129 bool moveAndRoll(float dt); … … 139 141 void aimAtTarget(); 140 142 bool isLookingAtTarget(float angle) const; 143 bool isLooking( ControllableEntity* entityThatLooks, ControllableEntity* entityBeingLookedAt, float angle )const; 141 144 142 145 //checks if spaceship points at enemy and if there are allies inbetween … … 155 158 Quaternion targetOrientation_; 156 159 160 void stopMoving(); 157 161 void setPositionOfTarget(const Vector3& target); 158 162 void setOrientationOfTarget(const Quaternion& orient); … … 164 168 165 169 WeakPtr<ControllableEntity> target_; 170 //WeakPtr<ControllableEntity> thisEntity_; 171 172 bool bEngaging_; 166 173 bool bShooting_; 167 174 WeakPtr<ControllableEntity> objectiveTarget_; 168 175 176 void lookAtTarget(float dt); 177 void stopLookingAtTarget(); 178 void startLookingAtTarget(); 179 bool bLookAtTarget_; 169 180 void maneuver(); 170 181 void chooseManeuverType();
Note: See TracChangeset
for help on using the changeset viewer.