Because I need more situations where a getKey is more elegant then the isKey, I was wondering if that is possible, because of....
This code only reacts on the 'a' key and doesn't seem to do anything with the 'b' key....
Is there a solution for this?
Yours,
Dennis
if ("a".equals(Greenfoot.getKey())) { sequence = 4; luckySeven(richting); } if (getWorld().getObjects(LevelUp.class).isEmpty() && Greenfoot.isKeyDown("u")){ levelUp = new LevelUp(); getWorld().addObject(levelUp, getX(), getY()-181+70); } if (getWorld().getObjects(Thombstone.class).isEmpty() && Greenfoot.isKeyDown("y")){ thombstone = new Thombstone(); getWorld().addObject(thombstone, getX(), -200); } if ("b".equals(Greenfoot.getKey())) { System.out.println("De b key is ingedrukt"); }