In my game I have things that you collect to increase your speed. However, I only want them on the screen for the first 10 seconds of the level or something like that. After that I don't want them to be on the screen anymore (like they just disappear, the hero doesn't collide with them or anything), and therefore it is impossible to collect these things. I tried this code:But it won't compile. What am I doing wrong?
if (GameWorld1.PowerUpTimer.millisElapsed() > 10000)
{
GameWorld1.removeObject(PowerUp);
}

