Changeset 8855 for code/trunk/src/modules/weapons/RocketController.h
- Timestamp:
- Aug 22, 2011, 3:05:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/weapons/RocketController.h
r7163 r8855 21 21 * 22 22 * Author: 23 * Gabriel Nadler , Originalfile: Oli Scheuss23 * Gabriel Nadler 24 24 * Co-authors: 25 25 * ... 26 26 * 27 27 */ 28 29 /** 30 @file RocketController.h 31 @brief Definition of the RocketController class. 32 */ 28 33 29 34 #ifndef _RocketController_H__ … … 32 37 #include "weapons/WeaponsPrereqs.h" 33 38 39 #include "tools/interfaces/Tickable.h" 34 40 #include "controllers/Controller.h" 35 #include "tools/interfaces/Tickable.h"36 #include "weapons/projectiles/SimpleRocket.h"37 #include "weapons/weaponmodes/SimpleRocketFire.h"38 41 39 42 namespace orxonox … … 41 44 /** 42 45 @brief 43 Controller for the Rocket (targetseeking)46 Controller for the SimpleRocket (target seeking) 44 47 @author 45 Gabriel Nadler, Originalfile: Oli Scheuss 48 Gabriel Nadler 49 @ingroup Weapons 46 50 */ 47 51 class _WeaponsExport RocketController : public Controller, public Tickable … … 52 56 53 57 virtual void tick(float dt); 58 /** 59 @brief Get the rocket that is controlled by this controller. 60 @return Returns a pointer to the rocket. 61 */ 54 62 SimpleRocket* getRocket() const 55 { return this->rocket_; }; 56 void setTarget(WorldEntity* target); 63 { return this->rocket_; }; 64 65 /** 66 @brief Set the target of the rocket. 67 @param target A pointer to the target. 68 */ 69 void setTarget(WorldEntity* target) 70 { this->target_ = target; } 71 57 72 protected: 73 void updateTargetPosition(); 58 74 void moveToPosition(const Vector3& target); 59 void setTargetPosition();60 void moveToTargetPosition();61 75 62 76 private: 63 SimpleRocket* rocket_; //!< The Rocket it controlls64 Vector3 targetPosition_; 65 WeakPtr<PlayerInfo> player_; 77 SimpleRocket* rocket_; //!< The Rocket it controls. 78 Vector3 targetPosition_; //!< The position of the target. 79 WeakPtr<PlayerInfo> player_; //!< The player the rocket belongs to. 66 80 67 WeakPtr<WorldEntity> target_; 68 69 81 WeakPtr<WorldEntity> target_; //!< The target. 70 82 }; 71 83 }
Note: See TracChangeset
for help on using the changeset viewer.