Hi friends,
I just shared my last simulation called Bumptest03 , and a don't know how to transfer a object reference using a method.
In my code I check the collision of the actor against the other Block, however I would like to define what Block it should check the collision.
So instead of this...
I would like to have something like this...
Thanks in advance !
Tomaz
public void checkCollision()
{
Actor actor = this.getOneIntersectingObject(GreenBlock.class);
if (actor != null)
{
moveWhenPushedBy();
}
}
public void checkCollision(<NAME OF THE OBJECT>)
{
Actor actor = this.getOneIntersectingObject(<NAME OF THE OBJECT>);
if (actor != null)
{
moveWhenPushedBy();
}
}

