Right, the game I’ve got is a 2D car racing game. I have implemented the finish line image in the game and so on. And I’ve got it as a separate sprite sheet. Here’s the code I’m attempting to alter in such a way, that ‘If car1blue intersects finishLine1, end game.’ But I just can’t seem to get it right. Here’s the code I’m attempting to alter;
if (IntersectPixels(destinationBlueRect, finishLine1TextureData, finishLine1Rectangle, finishLine1TextureData))
{
blueHit = true;
}
It would be even better if you could show me how to add an end game message saying ‘Player 1 wins’ (when car crosses finishline1) and end game roughly three seconds after that?
Any help is welcome please (I’m a newbie). Thank you!
You may want to implement this Game State Management system, as for your delay: