I am increasing the speed of my game object when the total number of them reaches a certain amount as follows:
if(GameController.count >= 10)
{
speed = -6;
}
if (GameController.count >= 20)
{
speed = -7;
}
if (GameController.count >= 30)
{
speed = -8;
}
if (GameController.count >= 40)
{
speed = -9;
}
if (GameController.count >= 50)
{
speed = -10;
}
if (GameController.count >= 60)
{
speed = -11;
}
if (GameController.count >= 70)
{
speed = -12;
}
if (GameController.count >= 80)
{
speed = -14;
}
if (GameController.count >= 90)
{
speed = -16;
}
if (GameController.count >= 100)
{
speed = -18;
}
if (GameController.count >= 110)
{
speed = -20;
}
This works but… I know there is a better way to do this but I am drawing a blank. Assistance would be appreciated.
Thank you