Hey Guys
Ihave a Problem.I am want to spawn at 30 seconds another Ball but it spawns like 20 .How can i do that ?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | public MyWorld() { super ( 640 , 400 , 1 ); this .addObject( new Ball3(), 100 , 100 ); } int Zeit = 0 ; int counter = 0 ; public void act() { Greenfoot.delay( 1 ); Zeit = Zeit+ 1 ; if ( Zeit== 100 ){ Zeit = 0 ; counter = counter+ 1 ; } showText((counter)+ "Zeit" , 30 , 40 ); if (counter== 30.01 ){ this .addObject( new Ball2(), 100 , 100 ); } } } |