What I want the game to do is that when a miniboss is killed multiple coins should appear. but this just doesn't happen, help me please
HELP please. thanks
else if (isTouching(enemy2.class))
{
shotenemy2 ++; //adds damage while shotenemy2 doesn't equal to 8;
if (shotenemy2b) //shotenemy2b means shotenemy2 == 8
{
removeTouching(enemy2.class); //death of enemy when shotenemy2b turns true
coin x = new coin();
getWorld().addObject(x, getX(),getY()); //this is where the coins should be added.
getWorld().addObject(x, getX()+7,getY()); //but only one coin is produced.
getWorld().addObject(x, getX()+3,getY()); //this is the code when an enemy disappears or dies.
getWorld().addObject(x, getX()+5,getY());
getWorld().addObject(x, getX()+9,getY());
shotenemy2 = 0;
}
Scene a = (Scene)getWorld();
getWorld().removeObject(this);
}

