Start und Game Over Bildschirm
This commit is contained in:
@@ -8,7 +8,8 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
*/
|
||||
public class MyWorld extends World
|
||||
{
|
||||
int timer = 200;
|
||||
int timer = 200; //Zeit, bevor das erste Projektil auftaucht
|
||||
//kann später noch beliebig angepasst werden
|
||||
|
||||
/**
|
||||
* Constructor for objects of class MyWorld.
|
||||
@@ -37,7 +38,8 @@ public class MyWorld extends World
|
||||
else{
|
||||
Projectile projectile = new Projectile();
|
||||
addObject(projectile,Greenfoot.getRandomNumber(300)+50,0);
|
||||
timer = 200;
|
||||
timer = 200; //zeitlicher Abstand
|
||||
}
|
||||
//zwischen den x Werten 50 und 350 spawnen die Projektile (anpassbar)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user