Start und Game Over Bildschirm

This commit is contained in:
2026-09-15 12:19:02 +02:00
parent c188985e02
commit d35e3a62de
35 changed files with 1960 additions and 20 deletions
+32
View File
@@ -0,0 +1,32 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class StartWorld here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class StartWorld extends World
{
/**
* Constructor for objects of class StartWorld.
*
*/
public StartWorld()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
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.
*/
private void prepare()
{
Button button = new Button();
addObject(button,200,350);
button.setImage("Start.png");
}
}