Changeset 10111 for code/branches/pickupsFS14/src/modules/jump/JumpEnemy.h
- Timestamp:
- Nov 5, 2014, 4:06:09 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickupsFS14/src/modules/jump/JumpEnemy.h
r10074 r10111 21 21 * 22 22 * Author: 23 * Fabi an 'x3n' Landau23 * Fabien Vultier 24 24 * Co-authors: 25 25 * ... … … 45 45 namespace orxonox 46 46 { 47 48 /**49 @brief50 This class manages the ball for @ref orxonox::Jump "Jump".51 52 It is responsible for both the movement of the ball in the x,z-plane as well as its interaction with the boundaries of the playing field (defined by the @ref orxonox::JumpCenterpoint "JumpCenterpoint") and the @ref orxonox::JumpFigure "JumpFigures". Or more precisely, it makes the ball bounce off then upper and lower delimiters of the playing field, it makes the ball bounce off the bats and also detects when a player scores and takes appropriate measures.53 54 @author55 Fabian 'x3n' Landau56 57 @ingroup Jump58 */59 47 class _JumpExport JumpEnemy : public MovableEntity 60 48 { … … 62 50 JumpEnemy(Context* context); 63 51 virtual ~JumpEnemy(); 64 65 52 virtual void tick(float dt); 66 67 53 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 68 69 /**70 @brief Set the dimensions of the playing field.71 @param width The width of the playing field.72 @param height The height of the playing field.73 */74 54 void setFieldDimension(float width, float height) 75 55 { this->fieldWidth_ = width; this->fieldHeight_ = height; } 76 /**77 @brief Get the dimensions of the playing field.78 @param dimension A vector with the width as the first and height as the second component.79 */80 56 void setFieldDimension(const Vector2& dimension) 81 57 { this->setFieldDimension(dimension.x, dimension.y); } 82 /**83 @brief Get the dimensions of the playing field.84 @return Returns a vector with the width as the first and height as the second component.85 */86 58 Vector2 getFieldDimension() const 87 59 { return Vector2(this->fieldWidth_, this->fieldHeight_); } 88 89 60 void setWidth(const float width) 90 61 { this->width_ = width; } … … 97 68 98 69 virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed); 99 100 void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball. 70 void setFigure(WeakPtr<JumpFigure> bats); 101 71 virtual void touchFigure(); 102 72 bool dead_; 103 73 protected: 104 105 74 float width_; 106 75 float height_; 107 108 float fieldWidth_; //!< The width of the playing field. 109 float fieldHeight_; //!< The height of the playing field. 110 76 float fieldWidth_; 77 float fieldHeight_; 111 78 float leftBoundary_; 112 79 float rightBoundary_; 113 80 float lowerBoundary_; 114 81 float upperBoundary_; 115 116 WeakPtr<JumpFigure> figure_; //!< An array with the two bats. 82 WeakPtr<JumpFigure> figure_; 117 83 }; 118 84 }
Note: See TracChangeset
for help on using the changeset viewer.