#ifndef FLOPPY_BIRD_PIPE_H #define FLOPPY_BIRD_PIPE_H #include #include #include #include class Pipe : public sf::Drawable { sf::Sprite pipe_top; sf::Sprite pipe_shaft; std::shared_ptr pipe_top_texture; std::shared_ptr pipe_shaft_texture; std::shared_ptr pipe_shaft_shader; sf::Vector2f position; float momentum; public: Pipe(float x, float y, std::shared_ptr pipe_top_texture, std::shared_ptr pipe_shaft_texture, std::shared_ptr shader); void tick(float step, float speed); bool collides(sf::FloatRect bounds); virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const; }; #endif //FLOPPY_BIRD_PIPE_H