Player Movement:
A - links D - rechts Leertaste - Springen
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user