Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 22, 2014, 3:05:46 PM (10 years ago)
Author:
fvultier
Message:

new items added. improved level generator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickupsFS14/src/modules/jump/JumpItem.h

    r10050 r10074  
    6262            JumpItem(Context* context);
    6363            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();
    6469
    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             */
    7470            void setFieldDimension(float width, float height)
    7571                { 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             */
    8072            void setFieldDimension(const Vector2& dimension)
    8173                { 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             */
    8674            Vector2 getFieldDimension() const
    8775                { return Vector2(this->fieldWidth_, this->fieldHeight_); }
    8876
    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_; }
    9085
    91             void setFigure(WeakPtr<JumpFigure> bats); //!< Set the bats for the ball.
    92 
    93             virtual void touchFigure();
     86            bool attachedToFigure_;
    9487
    9588        protected:
     
    9790            float fieldHeight_; //!< The height of the playing field.
    9891
     92            WeakPtr<JumpFigure> figure_; //!< An array with the two bats.
     93            float height_;
     94            float width_;
     95
    9996            float leftBoundary_;
    10097            float rightBoundary_;
    10198            float lowerBoundary_;
    10299            float upperBoundary_;
    103 
    104             WeakPtr<JumpFigure> figure_; //!< An array with the two bats.
    105100    };
    106101}
Note: See TracChangeset for help on using the changeset viewer.