/*Copyright (C) 2010 Deveaux Duncan

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 <SFML/Graphics.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 sf::Sprite &texture);
        void render(sf::RenderWindow &renderWindow);
        
        //Get and set methods
        void setTexture(const sf::Sprite &texture);
        const sf::Sprite &getTexture() const;
        
        //PhysicsObject virtual methods
        const sf::Vector2f &getOrigin() const;
        
        float getWidth() const;
        float getHeight() const;
        
        void setXPosition(float position);
        float getXPosition() const;
        void setYPosition(float position);
        float getYPosition() const;
        
        void takeAHit(float strength);
    
    private:
        void resizeTexture();
        
        sf::Sprite m_texture;
        float m_width;
        float m_height;
};

#endif