So im trying to make a breakout game for my project, and im trying to make it so when the ball hits a brick, it says "+10!" and i want it to disappear acouple of seconds afterwards. This is what i have so far
the issue im having is, because numActs is always running, the "+10!" message never stays on the screen the same amount of time. or if i hit multiple blocks at once, all the blocks after the last one stay on the world. if that makes sense to anyone
public void hit()
{
Ten = new Message("+10!",Color.BLACK,30,Color.WHITE);
getWorld().addObject(Ten, getX()+80, getY());
System.out.println(numActs);
}
public void removeTitle()
{
if(numActs==70)
{
getWorld().removeObject(Ten);
numActs=0;
}
System.out.println(numActs);
}
