Thats really good!!


MouseInfo mouse = Greenfoot.getMouseInfo(); if(mouse!=null) { if (Greenfoot.mouseClicked(null)) { mouseY = Greenfoot.getMouseInfo().getY(); mouseX = Greenfoot.getMouseInfo().getX(); } if(getY() > 109) { if(mouseY < getY()) { setLocation(getX(), getY() - 5); } } if(getY() < 554) { if(mouseY > getY()) { setLocation(getX(), getY() + 5); } } }
touch = (TouchOverlay)getWorld().getObjects(TouchOverlay.class).get(0); if (Greenfoot.mouseClicked(touch)) { turnTowards(Greenfoot.getMouseInfo().getX(), Greenfoot.getMouseInfo().getY()); }