Show Timer class codes.
Also, show codes around that which creates a BlueDot object.
import greenfoot.*; public class Level1Screen extends World { public Level1Screen() { super(800, 600, 1); } public void act() { Greenfoot.delay(60); Greenfoot.setWorld(new Test2()); } }
import greenfoot.*; /** * Write a description of class BlueDot here. * * @author (your name) * @version (a version number or a date) */ public class BlueDot extends Timer { /** * Act - do whatever the BlueDot wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act(ж) { Move(); Timer(); } public void Move() { move(10); } public void Timer() { if(getX() == 69) { Greenfoot.setWorld(new Test2()); Сode Reversatile } } }