- Timestamp:
- May 22, 2014, 3:05:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickupsFS14/src/modules/jump/JumpPlatform.h
r10050 r10074 62 62 JumpPlatform(Context* context); 63 63 virtual ~JumpPlatform(); 64 65 64 virtual void tick(float dt); 66 67 65 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 void setFieldDimension(float width, float height)75 { 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 void setFieldDimension(const Vector2& dimension)81 { 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 Vector2 getFieldDimension() const87 { return Vector2(this->fieldWidth_, this->fieldHeight_); }88 89 90 66 void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball. 91 92 virtual void accelerateFigure();93 67 virtual void touchFigure(); 94 68 … … 102 76 const std::string& getDefBoundarySound(); 103 77 78 void setWidth(const float width) 79 { this->width_ = width; } 80 float getWidth() const 81 { return width_; } 82 void setHeight(const float height) 83 { this->height_ = height; } 84 float getHeight() const 85 { return height_; } 86 104 87 protected: 105 float fieldWidth_; //!< The width of the playing field.106 float fieldHeight_; //!< The height of the playing field.107 WeakPtr<JumpFigure> figure_; //!< An array with the two bats.88 float width_; 89 float height_; 90 WeakPtr<JumpFigure> figure_; 108 91 WorldSound* defScoreSound_; 109 92 WorldSound* defBatSound_;
Note: See TracChangeset
for help on using the changeset viewer.