Trying to figure this out, been looking at tutorials and past discussions but it's lead me nowhere. This is my world's code.
Now I want to to have an actor, in this case a spider eat an ant, which will result in the score going up by one.
public class Floor extends World
{
private Scoreboard sb;
/**
* Constructor for objects of class Floor.
*
*/
public Floor()
{
super(600, 400, 1);
sb = new Scoreboard();
addObject (sb,70,30);
}
public void updateScore()
{
sb.changeScore();
}
}
