I tried this but it doesn't work and I don't know why, where's the problem in my code? The increment operators?
int bullm = 0;
int x = 1;
if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
{
bullm = +x;
}
if (bullm == 0)
{
bull1.setFillColor(sf::Color::Yellow);
bull2.setFillColor(sf::Color::Yellow);
bull3.setFillColor(sf::Color::Yellow);
bull4.setFillColor(sf::Color::Yellow);
}
if (bullm == 1)
{
bull1.setFillColor(sf::Color::Yellow);
bull2.setFillColor(sf::Color::Yellow);
bull3.setFillColor(sf::Color::Yellow);
bull4.setFillColor(sf::Color::Transparent);
}
if (bullm == 2)
{
bull1.setFillColor(sf::Color::Yellow);
bull2.setFillColor(sf::Color::Yellow);
bull3.setFillColor(sf::Color::Transparent);
bull4.setFillColor(sf::Color::Transparent);
}
if (bullm == 3)
{
bull1.setFillColor(sf::Color::Yellow);
bull2.setFillColor(sf::Color::Transparent);
bull3.setFillColor(sf::Color::Transparent);
bull4.setFillColor(sf::Color::Transparent);
}
if (bullm == 4)
{
bull1.setFillColor(sf::Color::Transparent);
bull2.setFillColor(sf::Color::Transparent);
bull3.setFillColor(sf::Color::Transparent);
bull4.setFillColor(sf::Color::Transparent);
}