#include "classicgraphicsmanager.h" #include "classicnote.h" ClassicGraphicsManager::ClassicGraphicsManager(sf::RenderTarget& target) : _sprite_container({Type::UP, Type::DOWN, Type::LEFT, Type::RIGHT}, std::make_unique("VeraMono.ttf")), _render_target(target) {} void ClassicGraphicsManager::initGraphics(ClassicNote* note) { note->setSprite(_sprite_container.getSprite(note->type())); note->sprite()->setCoordinates(note->getCoordinates(), 0, 0); } void ClassicGraphicsManager::resetGraphics(ClassicNote* note) { _sprite_container.resetSprite(note->sprite(), note->type()); note->setSprite(nullptr); } void ClassicGraphicsManager::draw(const ClassicNote *note) { _render_target.draw(*note->sprite()); }