I have this function
This method is called in the act function. The problem is that as long as the condition is true, it keeps add life to the setLifeOfplayer method. I just wanted it to happen once not in a loop.
Hope someone is out to help me on this one.
Thanks
public void bulletHitsPlayer(){ Bullet bullet = (Bullet)getOneIntersectingObject(Bullet.class); if(bullet != null){ // int value life = -1; } getLevel().setLifeOfPlayer(life); }