if Counter counter = (Counter)getWorld().getObjects(Counter.class).get(100); { Greenfoot.setWorld(new Level()); }
if Counter counter = (Counter)getWorld().getObjects(Counter.class).get(0); { Greenfoot.setWorld(new Level()); }
/** * Return the current counter value. */ public int getValue() { return value; } { if (Counter.getValue() >= 100) { Greenfoot.setWorld(new Level1()); } }
** 02. * Return the current counter value. 03. */ 04. public int getValue() 05. { 06. return value; 07. } 08. { if (value.getValue() >= 100) 09. { 10. Greenfoot.setWorld(new Level1()); 11. } 12. }