This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//iterate through the enemy bullets to check if they should be delete or updated
for (int i = 0; i != bEnemyBulletVect.size();)
{
//Checks if the bullet is on screen
if (bEnemyBulletVect[i]->GetY() < -50 || bEnemyBulletVect[i]->GetY() > m_windowH)
{
//we both delete the object and then its place in the vector, we only iterate i if this function doesn't trigger as i will represent a new value if the former i is deleted
if (bPlayerBulletVect[i]->GetY() < -50 || bPlayerBulletVect[i]->GetY() > m_windowH)
{
//we both delete the object and then its place in the vector, we only iterate i if this function doesn't trigger as i will represent a new value if the former i is deleted
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters