Player Movement:

A - links
D - rechts
Leertaste - Springen
This commit is contained in:
2026-09-15 09:57:01 +02:00
parent ec0e80fe97
commit 9e35cc9ebb
7 changed files with 140 additions and 47 deletions
+33
View File
@@ -0,0 +1,33 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class PlayerTestWorld here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class PlayerTestWorld extends World
{
/**
* Constructor for objects of class PlayerTestWorld.
*
*/
public PlayerTestWorld()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600, 400, 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()
{
Ground ground = new Ground();
addObject(ground,260,375);
Player player = new Player();
addObject(player,264,237);
}
}