Files
SMIMS_2026_2/SMIMS-Game/PlayerTestWorld.java
T
Jonas 9e35cc9ebb Player Movement:
A - links
D - rechts
Leertaste - Springen
2026-09-15 09:57:01 +02:00

34 lines
841 B
Java

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);
}
}