Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 27, 2017, 5:00:59 PM (8 years ago)
Author:
vyang
Message:

Asteroids2D erfolgreich als Minigame eingebunden, Dimensionen des Spielfeldes werden im CenterPoint gesetzt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DCenterPoint.h

    r11593 r11608  
    4949        public:
    5050            Asteroids2DCenterPoint(Context* context); //checks whether the gametype is actually Asteroids2D.
     51            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override; //!< Method to create a PongCenterpoint through XML.
     52            /**
     53            @brief Set the dimensions of the playing field.
     54            @param dimension A vector with the width of the playing field as first component and the height as second.
     55            */
     56            void setFieldDimension(const Vector2& dimension)
     57                { this->width_ = dimension.x; this->height_ = dimension.y; }
     58            /**
     59            @brief Get the dimensions of the playing field.
     60            @return Returns a vector with the width of the playing field as first component and the height as second.
     61            */
     62            Vector2 getFieldDimension() const
     63                { return Vector2(this->width_, this->height_); }
    5164
    5265        private:
    5366            void checkGametype();
     67            float width_, height_;
    5468
    5569    };
Note: See TracChangeset for help on using the changeset viewer.