Changeset 10215 for code/branches/presentationFS14/src/modules/objects/controllers/TurretController.h
- Timestamp:
- Jan 31, 2015, 5:31:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentationFS14/src/modules/objects/controllers/TurretController.h
r10072 r10215 39 39 namespace orxonox 40 40 { 41 42 43 41 /** 42 @brief 43 Controller for turrets. Chooses a target, and makes the turret aim/shoot at it. 44 44 45 46 47 48 49 50 51 45 The controllableEntity gets casted to Turret, so this controller won't work for anything else. 46 */ 47 class _OrxonoxExport TurretController : public ArtificialController, public Tickable 48 { 49 public: 50 TurretController(Context* context); 51 virtual ~TurretController(); 52 52 53 53 virtual void tick(float dt); 54 54 55 55 private: 56 56 57 58 59 57 void searchTarget(); 58 bool isLookingAtTargetNew(float angle) const; 59 float targetScore(Pawn* pawn, float distance) const; 60 60 61 62 61 bool once_; //!< Flag for executing code in the tick function only once. 62 }; 63 63 } 64 64
Note: See TracChangeset
for help on using the changeset viewer.