I want to write a code where if there is collision between a bullet and a sprite of any object of class Enemy, i execute the code inside the statement.
Is that possible?
if CollisionSimple::IsColliding(bullets[i].getGlobalBounds(), Enemies::(any object of class Enemies).sprite.getGlobalBounds())
{
execute this code;
}
I tried to figure it out myself for a while, but it appears im lacking some crucial knowledge.
Would be nice if someone could break it down for me 🙂
New contributor
Rogl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1