SpriteRef TextureAtlas::getSprite(const string &path) const { auto it = sprites.find(path); if (it == sprites.end()) { return SpriteRef(); } else { return it->second; } }
void Camera::SetTarget(Sprite& targetSprite) { this->targetSprite= SpriteRef(&targetSprite); }
Camera::Camera(Sprite& targetSprite): position(0.0, 0.0), followDistance(5.0, 5.0) { this->targetSprite= SpriteRef(&targetSprite); }