Hey everyone
I've a little problem with a score counter I've been working on. The way it works is that I've objects which if they have been shot they will send a true value via a method to their superclass called spawn. There that true value will be put into a another value (A1), A1 if true will add 1 to another value (B1). When that happened A1 will get the value false and reset the method it self.
that's the processing code. When an enemy has been hit by a bullet this code will be run
the i is just for delay.
What am i doing wrong? Or is there a better way (that i as a basic programmer can understand) to check if an enemy has been hit and the score needs to be added up?
Thanks for helping
public void getHitAEnemy(boolean a)
{
A1 = a;
if (A1 == true)
{
B1 += 1;
A1 = false;
getHitAEnemy(A1);
}
}if (isTouching(Bullet.class) == true)
{
int i = 0;
i++;
if (i == 2)
{
C1 = true;
getHitEnemy(C1);
this.getWorld().removeObject(this);
}
}


