- Timestamp:
- Nov 15, 2009, 1:15:42 PM (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/branches/particles2/src/modules/weapons/projectiles/Rocket.h
r6059 r6065 32 32 #include "OrxonoxPrereqs.h" 33 33 #include "worldentities/ControllableEntity.h" 34 #include "controllers/RocketController.h"35 34 36 35 namespace orxonox 37 36 { 37 class ConeCollisionShape; 38 38 39 39 /** … … 52 52 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a Rocket through XML. 53 53 virtual void tick(float dt); //!< Defines which actions the Rocket has to take in each tick. 54 55 54 56 virtual void moveFrontBack(const Vector2& value); 57 virtual void moveRightLeft(const Vector2& value); 58 virtual void moveUpDown(const Vector2& value); 55 virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint); 56 void destroyObject(); 57 58 virtual void moveFrontBack(const Vector2& value){} 59 virtual void moveRightLeft(const Vector2& value){} 60 virtual void moveUpDown(const Vector2& value){} 59 61 60 62 virtual void rotateYaw(const Vector2& value); … … 100 102 { this->rotateRoll(Vector2(value, 0)); } 101 103 102 /** 103 @brief Sets the primary thrust to the input amount. 104 @param thrust The amount of thrust. 105 */ 106 inline void setPrimaryThrust( float thrust ) 107 { this->primaryThrust_=thrust; } 108 // place your set-functions here. 109 // - hint: auxiliary thrust, rotation thrust. 110 111 /** 112 @brief Gets the primary thrust to the input amount. 113 @preturn The amount of thrust. 114 */ 115 inline float getPrimaryThrust() 116 { return this->primaryThrust_; } 117 // place your get-functions here. 104 void setOwner(Pawn* owner); 105 inline Pawn* getOwner() const 106 { return this->owner_; } 107 108 inline void setDamage(float damage) 109 { this->damage_ = damage; } 110 inline float getDamage() const 111 { return this->damage_; } 118 112 119 113 private: 120 RocketController *myController_; //!< The controller of the Rocket. 114 WeakPtr<Pawn> owner_; 115 Vector3 localAngularVelocity_; 116 float damage_; 117 bool bDestroy_; 121 118 122 btVector3 localLinearAcceleration_; //!< The linear acceleration that is used to move the Rocket the next tick. 123 btVector3 localAngularAcceleration_; //!< The linear angular acceleration that is used to move the Rocket the next tick. 124 float primaryThrust_; //!< The amount of primary thrust. This is just used, when moving forward. 125 float auxilaryThrust_; //!< The amount of auxilary thrust. Used for all other movements (except for rotations). 126 float rotationThrust_; //!< The amount of rotation thrust. Used for rotations only. 119 Model* model_; 120 ConeCollisionShape* collisionShape_; 121 Timer destroyTimer_; 122 float lifetime_; 127 123 }; 128 124
Note: See TracChangeset
for help on using the changeset viewer.