Merge remote-tracking branch 'origin/main'

# Conflicts:
#	SMIMS-Game/MyWorld.class
#	SMIMS-Game/MyWorld.java
#	SMIMS-Game/project.greenfoot
This commit is contained in:
2026-09-16 11:54:37 +02:00
11 changed files with 139 additions and 144 deletions
+6 -9
View File
@@ -10,7 +10,7 @@ public class MyWorld extends World
{
int PlattformCountdown;
int timer = 200; //Zeit, bevor das erste Projektil auftaucht
//kann später noch beliebig angepasst werden
//kann später noch beliebig angepasst werden
int targetTimer = 100;
/**
* Constructor for objects of class MyWorld.
@@ -22,7 +22,7 @@ public class MyWorld extends World
super(400, 600, 1);
prepare();
}
/**
* Prepare the world for the start of the program.
* That is: create the initial objects and add them to the world.
@@ -59,7 +59,7 @@ public class MyWorld extends World
if(PlattformCountdown==0) //Damit in regelmäßigen Abständen auf jeden Fall eine Plattform auftaucht
{
addObject(new Plattform(), Greenfoot.getRandomNumber(400), 5);
PlattformCountdown=50;
PlattformCountdown=100;
}
PlattformCountdown--;
if(Greenfoot.getRandomNumber(100000)>=99800)
@@ -78,12 +78,9 @@ public class MyWorld extends World
{
addObject(new BreakingPlattform(50), Greenfoot.getRandomNumber(400), 6); //Nach Links bewegende Plattform
}
if(Greenfoot.getRandomNumber(100000)>=99550)
{
addObject(new SpikedPlattform(50), Greenfoot.getRandomNumber(400), 6); //Nach Links bewegende Plattform
}
}
}
public void projectile(){
if(timer == 0){
Projectile projectile = new Projectile();
@@ -94,7 +91,7 @@ public class MyWorld extends World
timer = timer - 1;
}
}
public void targetingProjectile(){
if(targetTimer == 0){
TargetingProjectile targetingProjectile = new TargetingProjectile();