So i got this school project where i have to make my own game and i came up with the idea of a fish swimming around and eating smaller fish and then growing when eating but i cant seem to figure out how i came up with the idea that if i made a score system like
public void Eat()
{
Actor prey;
prey = getOneObjectAtOffset(0, 0, Prey.class);
if (prey != null)
{
World world;
world = getWorld();
world.removeObject(prey);
EatenFish = EatenFish +1;
}
I could say that
if ((int EatenFish == 1) == true);
{
GreenfootImage image = getImage();
image.scale(30, 30);
setImage(image);
}
so it would grow
and when the score hit 2 to grow
if ((EatenFish == 1) == true);
{
GreenfootImage image = getImage();
image.scale(90, 90);
setImage(image);
}
But it just starts out with being 90 x 90 instead
