gameEngine/gameEngine/Sprite.cpp
//removes collider from sprite with given name, if multiple with name only gets last one
removes collider from sprite with given name, if multiple with name only gets last one
removes collider from sprite with given name if multiple with name only gets last one
void Sprite::removeCollider(std::string name)
{
	int index = -1;
	for (int i = 0; i < this->colliders_.size(); i++)
	{
		std::string collName = colliders_[i]->getName();
		if (collName == name)
		{
			index = i;
		}
	}
	if (index != -1)
	{
		std::cout << "deleting " << colliders_.at(index)->getName();
		this->colliders_.erase(colliders_.begin() + index);
	}
	else
	{
		std::cout << "collider with the name of " << name << " not found";
	}
}
void Sprite :: removeCollider ( std :: string name ) { int index = -1 ; for ( int i = 0 ; i < this -> colliders_ . size ( ) ; i ++ ) { std :: string collName = colliders_ [ i ] -> getName ( ) ; if ( collName == name ) { index = i ; } } if ( index != -1 ) { std :: cout << " " << colliders_ . at ( index ) -> getName ( ) ; this -> colliders_ . erase ( colliders_ . begin ( ) + index ) ; } else { std :: cout << " " << name << " " ; } }
removes collider from sprite with given name, if multiple with name only gets last one
removes collider from sprite with given name if multiple with name only gets last one
//get index of collider //if found remove it from the vector