Changeset 10074 for code/branches/pickupsFS14/src/modules/jump/JumpItem.h
- Timestamp:
- May 22, 2014, 3:05:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickupsFS14/src/modules/jump/JumpItem.h
r10050 r10074 62 62 JumpItem(Context* context); 63 63 virtual ~JumpItem(); 64 virtual void tick(float dt); 65 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 66 virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed); 67 virtual void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball. 68 virtual void touchFigure(); 64 69 65 virtual void tick(float dt);66 67 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 70 void setFieldDimension(float width, float height) 75 71 { 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 72 void setFieldDimension(const Vector2& dimension) 81 73 { 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 74 Vector2 getFieldDimension() const 87 75 { return Vector2(this->fieldWidth_, this->fieldHeight_); } 88 76 89 virtual void setProperties(float newLeftBoundary, float newRightBoundary, float newLowerBoundary, float newUpperBoundary, float newHSpeed, float newVSpeed); 77 void setWidth(const float width) 78 { this->width_ = width; } 79 float getWidth() const 80 { return width_; } 81 void setHeight(const float height) 82 { this->height_ = height; } 83 float getHeight() const 84 { return height_; } 90 85 91 void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball. 92 93 virtual void touchFigure(); 86 bool attachedToFigure_; 94 87 95 88 protected: … … 97 90 float fieldHeight_; //!< The height of the playing field. 98 91 92 WeakPtr<JumpFigure> figure_; //!< An array with the two bats. 93 float height_; 94 float width_; 95 99 96 float leftBoundary_; 100 97 float rightBoundary_; 101 98 float lowerBoundary_; 102 99 float upperBoundary_; 103 104 WeakPtr<JumpFigure> figure_; //!< An array with the two bats.105 100 }; 106 101 }
Note: See TracChangeset
for help on using the changeset viewer.