Example #1
0
// Finds the sprite for a specific character
Sprite_Character* Spriteset_Map::FindCharacter(Game_Character* character) const
{
	std::vector<std::shared_ptr<Sprite_Character> >::const_iterator it;
	for (it = character_sprites.begin(); it != character_sprites.end(); ++it) {
		Sprite_Character* sprite = it->get();
		if (sprite->GetCharacter() == character)
			return sprite;
	}
	return NULL;
}
Example #2
0
////////////////////////////////////////////////////////////
/// Find the sprite for a specific character
////////////////////////////////////////////////////////////
Sprite_Character* Spriteset_Map::FindCharacter(Game_Character* character) const
{
	std::vector<Sprite_Character*>::const_iterator it;
	for (it = character_sprites.begin(); it != character_sprites.end(); it++) {
		Sprite_Character* sprite = *it;
		if (sprite->GetCharacter() == character)
			return sprite;
	}
	return NULL;
}