How i i make my code so if i touch an actor by my controlled actor my score goes up by 1
if(isTouching(OtherActor.class))
{
score++;
}// instance field
private boolean touchingScorer;
// in act or method it calls
if (!touchingScorer && isTouching(Scorer.class)
{
touchingScorer = true;
score++;
}
if (touchingScorer && !isTouching(Scorer.class)) touchingScorer = false;