Compare commits

...

4 Commits

Author SHA1 Message Date
Marlie c1de4dad10 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	SMIMS-Game/project.greenfoot
2026-09-17 11:21:27 +02:00
Marlie fe9208291f Merge remote-tracking branch 'origin/main'
# Conflicts:
#	SMIMS-Game/project.greenfoot
2026-09-17 11:18:20 +02:00
Marlie 2e11569755 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	SMIMS-Game/MyWorld.class
#	SMIMS-Game/MyWorld.java
#	SMIMS-Game/project.greenfoot
2026-09-17 11:15:39 +02:00
Marlie 964725a81c Textures und BreakingPlatform Änderung 2026-09-17 11:11:14 +02:00
14 changed files with 3 additions and 33 deletions
Binary file not shown.
-8
View File
@@ -1,8 +0,0 @@
#BlueJ class context
comment0.target=Healthbar
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Healthbar\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
comment1.params=
comment1.target=void\ act()
comment2.params=
comment2.target=void\ draw_health()
numComments=3
-20
View File
@@ -1,20 +0,0 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class Healthbar here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Healthbar extends Actor
{
public void act()
{
draw_health();
}
public void draw_health(){
Player player = getWorld().getObjects(Player.class).get(0);
setImage(new GreenfootImage("Health:" + player.health, 24, Color.WHITE, Color.BLACK));
}
}
+2 -4
View File
@@ -9,7 +9,7 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
public class MyWorld extends World
{
int PlattformCountdown;
int timer = 300; //Zeit, bevor das erste Projektil auftaucht
int timer = 600; //Zeit, bevor das erste Projektil auftaucht
//kann später noch beliebig angepasst werden
int targetTimer = 1000;
int time = 0;
@@ -58,8 +58,6 @@ public class MyWorld extends World
plattform2.setLocation(320,367);
plattform2.setLocation(312,371);
plattform2.setLocation(308,382);
//Healthbar healthbar = new Healthbar();
//addObject(healthbar,50,50);
Heart heart = new Heart();
addObject(heart,371,27);
Heart heart2 = new Heart();
@@ -144,7 +142,7 @@ public class MyWorld extends World
if(timer == 0){
Projectile projectile = new Projectile();
addObject(projectile,Greenfoot.getRandomNumber(300)+50,0);
timer = 300; //zeitlicher Abstand
timer = 600; //zeitlicher Abstand
}
else{
timer = timer - 1;
Binary file not shown.
+1 -1
View File
@@ -41,7 +41,7 @@ public class TemporaryGround extends Plattform
public void warning()
{
this.setImage("TemporaryIsBreaking.png");
this.setImage("BreakingGround.png");
warningHasHappend=true;
deWarningHasHappend=false;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB