here is my code:
here is my problem:
I want the player to remove Cobble if the player is intersecting PressurePlate.class but I couldn't figure out why it doesn't work. if I put cobble into the getWorld().removeObject(cobble); it doesn't do anything but if I put getWorld().removeObject(this); it is removing the player which isn't obviously what in want.
I'd appreciate any help!
Thanks!
1 2 3 4 5 6 7 8 | public void remove() { Actor cobble = getOneIntersectingObject(Cobble. class ); if (getOneIntersectingObject(PressurePlate. class ) != null ) { getWorld().removeObject(cobble); } } |