I have a Shark class, and for Big fish Small fish, I want the shark to spawn once when the score reaches 1500.
I tried this:
But when I reached to 1500 points, the sharks continued to be added into the world. Is there a way I could fix that?
public void spawnShark() { if (points == 1500) { addObject(new Shark(), 400, 400); } }