I am trying to make a bump effect when the hero makes impact with the tile if he drops from a platform but then quickly moves towards it, he will move onto it. I want to stop this, I have managed to get partially working for a section of the tile but not the whole tile. I've tried to attempt it using this:
The second is how do I get it to check for the tile on the right side of the screen?
My scenario is located here: http://www.greenfoot.org/scenarios/8881
public void act(){ Actor Mario; Mario = getOneObjectAtOffset(21, 25, Mario.class); if(Mario != null) { Mario.setLocation(Mario.getX() + 10, Mario.getY() ); } }