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