Example #1
0
void RenderManager::PewShotDraw(std::vector<Pew> &vector, std::vector<Pew>::iterator &iterator, int &points, IngameSound &sound, HighscoreManager &highscore, std::vector<Enemy> &enemyv, std::vector<SpaceMonkey> &monkeyv, std::vector<ShitBullets> &shitv, std::vector<Boss1> &boss1v, std::vector<Boss2> &boss2v, std::vector<Boss2Weapon> &boss2weaponv, std::vector<EnemyFormation> &enemyFormationv, std::vector<Boss3> &boss3v, std::vector<Boss3firstWeapon> &b3FWeapon, std::vector<Boss3SecWeapon> &b3SWeapon, sf::RenderWindow &window, float &elapsedTime)
{
	for (iterator = vector.begin(); iterator != vector.end();)
	{
		if (!iterator->active)
		{
			iterator = vector.erase(iterator);
		}
		else
		{
			coll::ProjectileToList(iterator, enemyv, points, sound, highscore);//enemy
			coll::ProjectileToMonkey(iterator, monkeyv, points, sound, highscore);//monkey
			coll::ProjectileToListNoHealth(iterator, shitv, points, sound, highscore);//shit
			coll::ProjectileToListNoHealth(iterator, boss2weaponv, points, sound, highscore);//boss2Weapon
			coll::ProjectileToListNoHealth(iterator, b3FWeapon, points, sound, highscore);//boss3FirstWeapon
			coll::ProjectileToList(iterator, b3SWeapon, points, sound, highscore);//boss3SecWeapon
			coll::Boss2Collision(iterator, boss2v, points, sound, highscore);//boss2
			coll::ProjectileToList(iterator, enemyFormationv, points, sound, highscore);//enemyFormation
			coll::Boss3Collision(boss3v, iterator, sound, highscore, points);//boss3

			iterator->Update(elapsedTime);
			iterator->Render(window);
			++iterator;
		}
	}
}
Example #2
0
void RenderManager::Boss2WeaponDraw(std::vector<Boss2Weapon> &vector, std::vector<Boss2Weapon>::iterator &iterator, float &elapsedTime, Player &pPlayer, Player2 &player2, sf::RenderWindow &window)
{
	for (iterator = vector.begin(); iterator != vector.end();)
	{
		if (!iterator->active)
		{
			iterator = vector.erase(iterator);
		}
		else
		{
			iterator->Update(window, elapsedTime, pPlayer, player2);
			iterator->Render(window);
			++iterator;
		}
	}
}
Example #3
0
void RenderManager::DoubleShotDraw(std::vector<DoubleShot> &vector, std::vector<DoubleShot>::iterator &iterator, int &points, IngameSound &sound, HighscoreManager &highscore, std::vector<Enemy> &enemyv, std::vector<SpaceMonkey> &monkeyv, std::vector<ShitBullets> &shitv, std::vector<Boss1> &boss1v, bool &boss1Dead, std::vector<Boss2Weapon> &boss2weaponv, std::vector<EnemyFormation> &enemyFormationv, sf::RenderWindow &window, float &elapsedTime)
{
	for (iterator = vector.begin(); iterator != vector.end();)
	{
		if (!iterator->active)
		{
			iterator = vector.erase(iterator);
		}
		else
		{
			coll::ProjectileToList(iterator, enemyv, points, sound, highscore);//enemy
			coll::ProjectileToMonkey(iterator, monkeyv, points, sound, highscore);//monkey
			coll::ProjectileToListNoHealth(iterator, shitv, points, sound, highscore);//shit
			coll::ProjectileToListNoHealth(iterator, boss2weaponv, points, sound, highscore);//boss2Weapon
			coll::BossCollision(iterator, boss1v, points, sound, highscore, boss1Dead);//boss1
			coll::ProjectileToList(iterator, enemyFormationv, points, sound, highscore);//enemyFormation

			iterator->Update(window, elapsedTime);
			iterator->Render(window);
			++iterator;
		}
	}
}