/*Copyright (C) 2010-2012 Duncan Deveaux

This file is part of Hikou no mizu.

Hikou no mizu is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Hikou no mizu is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Hikou no mizu.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef DEF_PLATFORM
#define DEF_PLATFORM

#include "Graphics/Drawable/Sprite.hpp"
#include "Engines/Physics/PhysicsObject.hpp"

//PhysicsObject's inheriting class representing a simple textured platform.
class Platform : public PhysicsObject
{
    public:
        Platform(float width, float height, const Sprite &sprite);
        void draw();
        
        //Get and set methods
        void setSprite(const Sprite &sprite);
        const Sprite &getSprite() const;
        
        //PhysicsObject virtual methods
        void setXPosition(float position);
        float getXPosition() const;
        
        void setYPosition(float position);
        float getYPosition() const;
        
        float getXOrigin() const;
        float getYOrigin() const;
        
        float getWidth() const;
        float getHeight() const;
        
        void takeAHit(float strength, int side);
    
    private:
        void resizeSprite();
        
        Sprite m_sprite;
        float m_width;
        float m_height;
};

#endif
