i want to know how you can get more time. when you move over a item.
1 2 3 4 5 6 7 8 9 | Actor pizza = getOneIntersectingObject(Pizza.class); if(pizza!=null) { World myWorld = getWorld(); myWorld.removeObject (pizza); Rivets rivets = (Rivets)myWorld; Counter counter = rivets.getCounter(); counter.addScore(); } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | int timer= 0; public void act() { if (timer== (900)) { getWorld().addObject(new Gameover(), 350, 250); Greenfoot.stop(); } addTimer(); } private void addTimer() { timer++; } |