#pragma once

#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include "IEntity.hpp"

class Collider;

class Spike: public sf::Sprite, public IEntity {
public:
	Spike(Collider* collider, bool alive);
	void update(float delta) override;
	void move(float dy);
	void release();
	void registerColl();
private:
	Collider* m_collider;
	bool m_hold;
	bool m_falling;
	sf::Clock m_clock;
	float m_baseY;
	sf::Sound m_boom;
	bool m_alive;
};