/**
 *  Triangles
 *  Copyright (C) 2016 POSITIVE MENTAL ATTITUDE
 *
 *  This program 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, version 3 of the License.
 *
 *  This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <SFML/Graphics.hpp>
#include "Lantern.hpp"

/**
 * @class Wormhole
 * @author POSITIVE MENTAL ATTITUDE
 * @date 06/13/16
 * @file Wormhole.hpp
 * @brief A pretty independent class managing that wormhole.
 */
class Wormhole: public sf::Drawable, public Lantern
{
	public:
		Wormhole();
		virtual ~Wormhole();
		void load(const sf::Texture& texture1, const sf::Texture& texture2);
		void update(sf::Time delta);
		void setPosition(sf::Vector2f position);
		void setPosition(float x, float y);
		sf::Vector2f getPosition();
		float gravity(sf::Vector2f position);
		sf::Vector2f direction(sf::Vector2f position);

	private:
		virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
		sf::Sprite _sprite;
};

