I need a little help. I have three actors: Boy, Pingu and Counter. I want to see if Boy and Pingu are touching in the third actor class (Counter). Can you help me? I'm searching this for 2 days. Can you help me guys? :)
if (isTouching(Pingu.class))
{
Counter c = (Counter) getWorld().getObjects(Counter.class).get(0);
if (c != null)
{
//now you can call a method on c to do something with the counter
}
}Boy b = (Boy) getWorld().getObjects(Boy.class).get(0);
if (b != null && b.touchingPingu())
{
//do something
}public boolean touchingPingu()
{
return isTouching(Pingu.class);
}