Compare commits
95 Commits
903d791b6b
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| df41cd63c3 | |||
| 18f6594ec7 | |||
| c52ba44c44 | |||
| 8a15fa5a51 | |||
| c0b6517f14 | |||
| 40d5295716 | |||
| 153f710a44 | |||
| d84b853b65 | |||
| bd0e81a2f7 | |||
| a36481e098 | |||
| c97dcde07a | |||
| 4d5e6ad567 | |||
| 69e753d5a8 | |||
| a7cfa6923a | |||
| fe6d466cd6 | |||
| 047fe9597d | |||
| af551a1a57 | |||
| dc85fd679b | |||
| 8ae09335c0 | |||
| c1de4dad10 | |||
| fe9208291f | |||
| 1fbc555d31 | |||
| 2e11569755 | |||
| b5bbd00cc1 | |||
| 97c8d5641e | |||
| 964725a81c | |||
| aa07effa13 | |||
| 6ab5576115 | |||
| f70e394f01 | |||
| 9a0d7e7f7a | |||
| f1bb70a2a2 | |||
| 1796607c93 | |||
| 5cf095c370 | |||
| ddba231979 | |||
| c0c5151c41 | |||
| 236a363572 | |||
| 6215bff73d | |||
| c719e5b053 | |||
| b3a951626c | |||
| 3d047538f1 | |||
| a39e816038 | |||
| 443b4e9247 | |||
| 1ed7e0ce1f | |||
| fe11e83e78 | |||
| fc9f3a660e | |||
| f7f611c2ae | |||
| eba1e4567e | |||
| a0de2fb58d | |||
| aa8fb9a067 | |||
| 66b7ced23a | |||
| 532e78de04 | |||
| 1cd6356f4f | |||
| f8c53b518d | |||
| b095aeb05f | |||
| c605600c84 | |||
| 8477d63e51 | |||
| da0a97adfe | |||
| bfada2dbc2 | |||
| 22d42273c1 | |||
| ce7d999b0f | |||
| cdc2e107d5 | |||
| 51725cd2b8 | |||
| cdcb5a5bac | |||
| e58b55993d | |||
| afdeede498 | |||
| 56b755b3d6 | |||
| eae3e92d60 | |||
| 963fa43986 | |||
| 5d65c61f15 | |||
| 8fad77b878 | |||
| 6127510ec8 | |||
| aae6ac5e41 | |||
| 4013820d8d | |||
| 8eeb32af40 | |||
| 6ee623cad4 | |||
| dfe93e4da5 | |||
| 4bc13d6d57 | |||
| 282a2cade3 | |||
| bbd34812cb | |||
| d7645d43f0 | |||
| 024738ff62 | |||
| e345d13140 | |||
| 293c235352 | |||
| 95e96d7e44 | |||
| d35e3a62de | |||
| 086274bc82 | |||
| 927e19c146 | |||
| e63fc5cadc | |||
| d9f0219cf1 | |||
| 9cef598196 | |||
| 81fb707beb | |||
| bb987610a2 | |||
| 44f7382b6f | |||
| c188985e02 | |||
| 07c5614d44 |
@@ -1,9 +1,11 @@
|
||||
#BlueJ class context
|
||||
comment0.target=BreakingPlattform
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ BreakingPlattform\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ BreakingPlattform\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment1.params=pBreakingCountdown
|
||||
comment1.target=BreakingPlattform(int)
|
||||
comment2.params=
|
||||
comment2.target=void\ breakPlattform()
|
||||
numComments=3
|
||||
comment2.target=void\ act()
|
||||
comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ BreakingPlattform\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment3.params=
|
||||
comment3.target=void\ breakPlattform()
|
||||
numComments=4
|
||||
|
||||
@@ -9,24 +9,39 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
public class BreakingPlattform extends Plattform
|
||||
{
|
||||
boolean IsBreaking= false;
|
||||
int BreakingCountdown;
|
||||
public BreakingPlattform(int pBreakingCountdown)
|
||||
{
|
||||
BreakingCountdown=pBreakingCountdown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Act - do whatever the BreakingPlattform wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
super.act();
|
||||
if(this.PlayerOnPlattform() && IsBreaking==false)
|
||||
{
|
||||
IsBreaking= true;
|
||||
//Greenfoot.playSound("...")
|
||||
this.setImage("Breaking2.png");
|
||||
|
||||
}
|
||||
if(IsBreaking)
|
||||
{
|
||||
BreakingCountdown--;
|
||||
if(BreakingCountdown==0)
|
||||
{
|
||||
this.breakPlattform();
|
||||
}
|
||||
}
|
||||
super.act();
|
||||
}
|
||||
|
||||
public void breakPlattform()
|
||||
{
|
||||
if(this.PlayerOnPlattform())
|
||||
{
|
||||
|
||||
}
|
||||
//Animation
|
||||
geloescht=true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Button
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Button\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Button\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
numComments=2
|
||||
@@ -0,0 +1,21 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class Button here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Button extends Actor
|
||||
{
|
||||
/**
|
||||
* Act - do whatever the Button wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
if (Greenfoot.mousePressed(this)){
|
||||
Greenfoot.setWorld(new MyWorld());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Enemy
|
||||
comment1.params=targetX\ targetY
|
||||
comment1.target=Enemy(int,\ int)
|
||||
comment2.params=
|
||||
comment2.target=void\ act()
|
||||
comment3.params=targetX\ targetY
|
||||
comment3.target=void\ moveToTargetLocation(int,\ int)
|
||||
comment4.params=
|
||||
comment4.target=void\ shootAtPlayer()
|
||||
numComments=5
|
||||
@@ -0,0 +1,51 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
public class Enemy extends Actor
|
||||
{
|
||||
int targetX;
|
||||
int targetY;
|
||||
|
||||
boolean targetReached = false;
|
||||
|
||||
int speed = 3;
|
||||
public Enemy (int targetX, int targetY) {
|
||||
this.targetX = targetX;
|
||||
this.targetY = targetY;
|
||||
}
|
||||
|
||||
int shootTimer;
|
||||
public void act()
|
||||
{
|
||||
shootAtPlayer();
|
||||
if (!targetReached){
|
||||
moveToTargetLocation(targetX, targetY);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void moveToTargetLocation(int targetX, int targetY){
|
||||
double dx = targetX - getX();
|
||||
double dy = targetY - getY();
|
||||
double distance = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
|
||||
if (distance < 2){
|
||||
targetReached = true;
|
||||
}
|
||||
setLocation(getX() + (int)(dx/distance*speed), getY() + (int)(dy/distance*speed));
|
||||
}
|
||||
|
||||
public void shootAtPlayer(){
|
||||
Player player = getWorld().getObjects(Player.class).get(0);
|
||||
shootTimer++;
|
||||
if (player.getX() - getX() < 0){
|
||||
setImage("Enemy.png");
|
||||
} else if (player.getX() - getX() > 0){
|
||||
setImage("EnemyRight.png");
|
||||
}
|
||||
if (shootTimer >= 100){
|
||||
EnemyProjectile enemyProjectile = new EnemyProjectile();
|
||||
getWorld().addObject(enemyProjectile, getX(), getY());
|
||||
enemyProjectile.turnTowards(player.getX(), player.getY());
|
||||
shootTimer = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#BlueJ class context
|
||||
comment0.target=EnemyProjectile
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ EnemyProjectile\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ EnemyProjectile\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment2.params=
|
||||
comment2.target=boolean\ isProjectileOnScreen()
|
||||
numComments=3
|
||||
@@ -0,0 +1,34 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class EnemyProjectile here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class EnemyProjectile extends Projectile
|
||||
{
|
||||
/**
|
||||
* Act - do whatever the EnemyProjectile wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
move(10);
|
||||
if (!isProjectileOnScreen()){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isProjectileOnScreen(){
|
||||
//Check Y-Value
|
||||
if (getY() <= 0 || getY() >= getWorld().getHeight()-1){
|
||||
return false;
|
||||
}
|
||||
//Check X-Value
|
||||
if (getX() <= 0 || getX() >= getWorld().getWidth()-1){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#BlueJ class context
|
||||
comment0.target=GameOverWorld
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ GameOverWorld\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
|
||||
comment1.params=score
|
||||
comment1.target=GameOverWorld(int)
|
||||
comment2.params=
|
||||
comment2.target=void\ prepare()
|
||||
comment2.text=\r\n\ Prepare\ the\ world\ for\ the\ start\ of\ the\ program.\r\n\ That\ is\:\ create\ the\ initial\ objects\ and\ add\ them\ to\ the\ world.\r\n
|
||||
comment3.params=
|
||||
comment3.target=void\ showScore()
|
||||
numComments=4
|
||||
@@ -0,0 +1,44 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class GameOverWorld here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class GameOverWorld extends World
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor for objects of class GameOverWorld.
|
||||
*
|
||||
*/
|
||||
int score;
|
||||
public GameOverWorld(int score)
|
||||
{
|
||||
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
|
||||
super(400, 600, 1);
|
||||
this.score = score;
|
||||
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,520);
|
||||
button.setImage("Neustart.png");
|
||||
showScore();
|
||||
}
|
||||
|
||||
public void showScore(){
|
||||
Color hintergrundFarbe = new Color(0,0,0,0);
|
||||
GreenfootImage scoreBild = new GreenfootImage("" + score, 75, Color.WHITE, hintergrundFarbe);
|
||||
Score score3 = new Score();
|
||||
addObject(score3,200,72);
|
||||
score3.setImage(scoreBild);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Groundflower
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ StarPowerUp\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ StarPowerUp\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment2.params=
|
||||
comment2.target=void\ collect()
|
||||
numComments=3
|
||||
@@ -0,0 +1,30 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class StarPowerUp here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Groundflower extends PowerUps
|
||||
{
|
||||
int duration= 60*4; //15 Sekunden
|
||||
/**
|
||||
* Act - do whatever the StarPowerUp wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
moveDown();
|
||||
touchedByPlayer();
|
||||
if (deleteAfterActCycle){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
@ Override void collect()
|
||||
{
|
||||
Player player = getIntersectingObjects(Player.class).get(0);
|
||||
player.receivePowerUp(duration, "GroundPower");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#BlueJ class context
|
||||
comment0.target=HealthItem
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ HealthItem\ 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\ collect()
|
||||
numComments=3
|
||||
@@ -0,0 +1,24 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class HealthItem here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class HealthItem extends PowerUps
|
||||
{
|
||||
public void act()
|
||||
{
|
||||
moveDown();
|
||||
touchedByPlayer();
|
||||
if (deleteAfterActCycle){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override void collect(){
|
||||
Player player = getIntersectingObjects(Player.class).get(0);
|
||||
player.receivePowerUp(duration, "Heal");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Heart
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Heart\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Heart\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
numComments=2
|
||||
@@ -0,0 +1,19 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class Heart here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Heart extends Actor
|
||||
{
|
||||
/**
|
||||
* Act - do whatever the Heart wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
// Add your action code here.
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
#BlueJ class context
|
||||
comment0.target=JumpBoostItem
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ JumpBoostItem\ 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\ collect()
|
||||
numComments=3
|
||||
@@ -0,0 +1,25 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class JumpBoostItem here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class JumpBoostItem extends PowerUps
|
||||
{
|
||||
int duration = 60*5;
|
||||
public void act()
|
||||
{
|
||||
moveDown();
|
||||
touchedByPlayer();
|
||||
if (deleteAfterActCycle){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override void collect(){
|
||||
Player player = getIntersectingObjects(Player.class).get(0);
|
||||
player.receivePowerUp(duration, "JumpBoost");
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,6 @@ comment2.target=void\ act()
|
||||
comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ MovingPlattform\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment3.params=
|
||||
comment3.target=void\ bewege()
|
||||
numComments=4
|
||||
comment4.params=
|
||||
comment4.target=void\ bewegeSpielerMit()
|
||||
numComments=5
|
||||
|
||||
@@ -9,7 +9,7 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
public class MovingPlattform extends Plattform
|
||||
{
|
||||
int speed;
|
||||
|
||||
int temp=0;
|
||||
public MovingPlattform(int pSpeed)
|
||||
{
|
||||
speed= pSpeed;
|
||||
@@ -22,17 +22,32 @@ public class MovingPlattform extends Plattform
|
||||
public void act()
|
||||
{
|
||||
// Add your action code here.
|
||||
super.act();
|
||||
this.bewege();
|
||||
this.bewegeSpielerMit();
|
||||
super.act();
|
||||
}
|
||||
|
||||
public void bewege()
|
||||
{
|
||||
MyWorld theWorld= (MyWorld) this.getWorld();
|
||||
move(speed);
|
||||
if(this.getX()<5 || this.getX()<=theWorld.getWidth())
|
||||
this.setLocation(this.getX()+speed, this.getY());
|
||||
if(this.getX()<5 || this.getX()>=theWorld.getWidth()-5)
|
||||
{
|
||||
this.loescheMich();
|
||||
speed=speed*(-1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void bewegeSpielerMit()
|
||||
{
|
||||
if(this.PlayerOnPlattform())
|
||||
{
|
||||
World theWorld= this.getWorld();
|
||||
Player DerSpieler = theWorld.getObjects(Player.class).get(0);
|
||||
if(DerSpieler!=null)
|
||||
{
|
||||
DerSpieler.setLocation(DerSpieler.getX()+speed*2, DerSpieler.getY());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,4 +7,18 @@ comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ MyWorld.\r\n\ \r\n
|
||||
comment2.params=
|
||||
comment2.target=void\ prepare()
|
||||
comment2.text=\r\n\ Prepare\ the\ world\ for\ the\ start\ of\ the\ program.\r\n\ That\ is\:\ create\ the\ initial\ objects\ and\ add\ them\ to\ the\ world.\r\n
|
||||
numComments=3
|
||||
comment3.params=
|
||||
comment3.target=void\ act()
|
||||
comment4.params=
|
||||
comment4.target=void\ drawNewHearts()
|
||||
comment5.params=
|
||||
comment5.target=void\ spawnItems()
|
||||
comment6.params=
|
||||
comment6.target=void\ spawnEnemies()
|
||||
comment7.params=
|
||||
comment7.target=void\ projectile()
|
||||
comment8.params=
|
||||
comment8.target=void\ targetingProjectile()
|
||||
comment9.params=
|
||||
comment9.target=void\ showScore()
|
||||
numComments=10
|
||||
|
||||
@@ -8,7 +8,14 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
*/
|
||||
public class MyWorld extends World
|
||||
{
|
||||
|
||||
int PlattformCountdown;
|
||||
int timer = 600; //Zeit, bevor das erste Projektil auftaucht
|
||||
//kann später noch beliebig angepasst werden
|
||||
int targetTimer = 1000;
|
||||
int time = 0;
|
||||
int enemyTimer;
|
||||
int itemTimer;
|
||||
int score = 0;
|
||||
/**
|
||||
* Constructor for objects of class MyWorld.
|
||||
*
|
||||
@@ -19,6 +26,7 @@ public class MyWorld extends World
|
||||
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.
|
||||
@@ -27,5 +35,155 @@ public class MyWorld extends World
|
||||
{
|
||||
Player player = new Player();
|
||||
addObject(player,302,320);
|
||||
Score score1 = new Score();
|
||||
addObject(score1, 200, 30);
|
||||
score1.setImage("Score1.png");
|
||||
Score score2 = new Score();
|
||||
addObject(score2, 200, 60);
|
||||
score2.setImage("Score2.png");
|
||||
Plattform plattform = new Plattform();
|
||||
addObject(plattform,285,577);
|
||||
plattform.setLocation(286,492);
|
||||
plattform.setLocation(293,379);
|
||||
removeObject(plattform);
|
||||
Plattform plattform2 = new Plattform();
|
||||
addObject(plattform2,291,373);
|
||||
Plattform plattform3 = new Plattform();
|
||||
addObject(plattform3,123,268);
|
||||
plattform3.setLocation(136,306);
|
||||
Plattform plattform4 = new Plattform();
|
||||
addObject(plattform4,294,204);
|
||||
Plattform plattform5 = new Plattform();
|
||||
addObject(plattform5,105,112);
|
||||
plattform2.setLocation(320,367);
|
||||
plattform2.setLocation(312,371);
|
||||
plattform2.setLocation(308,382);
|
||||
Heart heart = new Heart();
|
||||
addObject(heart,371,27);
|
||||
Heart heart2 = new Heart();
|
||||
addObject(heart2,343,27);
|
||||
Heart heart3 = new Heart();
|
||||
addObject(heart3,314,27);
|
||||
|
||||
addObject(new TemporaryGround(60*8), 200, 575);
|
||||
}
|
||||
|
||||
public void act()
|
||||
{
|
||||
if (getObjects(Score.class).size() > 0){
|
||||
removeObjects(getObjects(Score.class));
|
||||
}
|
||||
Score score1 = new Score();
|
||||
addObject(score1, 200, 30);
|
||||
score1.setImage("Score1.png");
|
||||
Score score2 = new Score();
|
||||
addObject(score2, 200, 60);
|
||||
score2.setImage("Score2.png");
|
||||
showScore();
|
||||
projectile();
|
||||
spawnEnemies();
|
||||
targetingProjectile();
|
||||
spawnItems();
|
||||
drawNewHearts();
|
||||
if(PlattformCountdown==0) //Damit in regelmäßigen Abständen auf jeden Fall eine Plattform auftaucht
|
||||
{
|
||||
addObject(new Plattform(), 1+Greenfoot.getRandomNumber(398), 5);
|
||||
PlattformCountdown=50;
|
||||
}
|
||||
PlattformCountdown--;
|
||||
if(Greenfoot.getRandomNumber(100000)>=99800)
|
||||
{
|
||||
addObject(new Plattform(), 1+Greenfoot.getRandomNumber(398), 5);
|
||||
}
|
||||
if(Greenfoot.getRandomNumber(100000)>=99900)
|
||||
{
|
||||
addObject(new MovingPlattform(1), 1+Greenfoot.getRandomNumber(398), 6); //Nach Rechts bewegende Plattform
|
||||
}
|
||||
if(Greenfoot.getRandomNumber(100000)>=99900)
|
||||
{
|
||||
addObject(new MovingPlattform(-1), 1+Greenfoot.getRandomNumber(398), 6); //Nach Links bewegende Plattform
|
||||
}
|
||||
if(Greenfoot.getRandomNumber(100000)>=99750)
|
||||
{
|
||||
addObject(new BreakingPlattform(50), 1+Greenfoot.getRandomNumber(398), 6); //Nach Links bewegende Plattform
|
||||
}
|
||||
if(Greenfoot.getRandomNumber(100000)>=99750)
|
||||
{
|
||||
addObject(new SpikedPlattform(40), 1+Greenfoot.getRandomNumber(398), 6); //Nach Links bewegende Plattform
|
||||
}
|
||||
}
|
||||
|
||||
public void drawNewHearts(){
|
||||
Player player = getObjects(Player.class).get(0);
|
||||
removeObjects(getObjects(Heart.class));
|
||||
Heart heart = new Heart();
|
||||
addObject(heart,371,27);
|
||||
if (player.health >= 2){
|
||||
Heart heart2 = new Heart();
|
||||
addObject(heart2,343,27);
|
||||
}
|
||||
if (player.health == 3){
|
||||
Heart heart3 = new Heart();
|
||||
addObject(heart3,314,27);
|
||||
}
|
||||
}
|
||||
|
||||
public void spawnItems(){
|
||||
itemTimer++;
|
||||
if (itemTimer >= 575){
|
||||
itemTimer = 0;
|
||||
switch (Greenfoot.getRandomNumber(3)){
|
||||
case 0:
|
||||
Groundflower groundF = new Groundflower();
|
||||
addObject(groundF, Greenfoot.getRandomNumber(getWidth()-100)+50,0);
|
||||
break;
|
||||
case 1:
|
||||
HealthItem healthItem = new HealthItem();
|
||||
addObject(healthItem, Greenfoot.getRandomNumber(getWidth()-100)+50,0);
|
||||
break;
|
||||
case 2:
|
||||
JumpBoostItem jumpBoostItem = new JumpBoostItem();
|
||||
addObject(jumpBoostItem, Greenfoot.getRandomNumber(getWidth()-100)+50,0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void spawnEnemies(){
|
||||
enemyTimer++;
|
||||
if (enemyTimer >= 420){
|
||||
Enemy enemy = new Enemy(Greenfoot.getRandomNumber(getWidth() - 50) + 25, Greenfoot.getRandomNumber(getHeight()/2) + 15);
|
||||
addObject(enemy, Greenfoot.getRandomNumber(getWidth()-100)+50,0);
|
||||
enemyTimer = 0;
|
||||
}
|
||||
|
||||
}
|
||||
public void projectile(){
|
||||
if(timer == 0){
|
||||
Projectile projectile = new Projectile();
|
||||
addObject(projectile,Greenfoot.getRandomNumber(300)+50,0);
|
||||
timer = 600; //zeitlicher Abstand
|
||||
}
|
||||
else{
|
||||
timer = timer - 1;
|
||||
}
|
||||
}
|
||||
|
||||
public void targetingProjectile(){
|
||||
if(targetTimer == 0){
|
||||
TargetingProjectile targetingProjectile = new TargetingProjectile();
|
||||
addObject(targetingProjectile, Greenfoot.getRandomNumber(300)+50,0);
|
||||
targetTimer = 1000;
|
||||
}
|
||||
else{
|
||||
targetTimer = targetTimer - 1;
|
||||
}
|
||||
}
|
||||
|
||||
public void showScore(){
|
||||
time++;
|
||||
score = time/60;
|
||||
showText("" + score, 200, 60);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
*/
|
||||
public class Plattform extends Actor
|
||||
{
|
||||
boolean geloescht= false;
|
||||
/**
|
||||
* Act - do whatever the Plattform wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
@@ -15,6 +16,10 @@ public class Plattform extends Actor
|
||||
public void act()
|
||||
{
|
||||
this.scrollNachUnten();
|
||||
if(geloescht)
|
||||
{
|
||||
this.loescheMich();
|
||||
}
|
||||
// Add your action code here.
|
||||
}
|
||||
|
||||
@@ -24,7 +29,7 @@ public class Plattform extends Actor
|
||||
setLocation(this.getX(),this.getY()+2); // Nach unten turnen
|
||||
if(this.getY()>= welt.getHeight()-5 ||this.getY()<=0)
|
||||
{
|
||||
this.loescheMich();
|
||||
geloescht= true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,10 +40,10 @@ public class Plattform extends Actor
|
||||
|
||||
public boolean PlayerOnPlattform()
|
||||
{
|
||||
Actor Spieler= getOneObjectAtOffset(0, 5, Player.class);
|
||||
if(Spieler!= null)
|
||||
Player Spieler= (Player) this.getWorld().getObjects(Player.class).get(0);
|
||||
if(Spieler.getX()+(Spieler.getImage().getWidth()/2)>=this.getX()-(this.getImage().getWidth()/2) && Spieler.getX()-(Spieler.getImage().getWidth()/2)<=this.getX()+(this.getImage().getWidth()/2))
|
||||
{
|
||||
if(Spieler.equals(Player.class))
|
||||
if(Spieler.getY()+(Spieler.getImage().getHeight()/2)<=this.getY()-(this.getImage().getHeight()/2) && Spieler.getY()+(Spieler.getImage().getHeight()/2)>=this.getY()-(this.getImage().getHeight()/2))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -51,5 +56,6 @@ public class Plattform extends Actor
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,24 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Player
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Player\ 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()
|
||||
comment10.params=
|
||||
comment10.target=void\ playerRotation()
|
||||
comment2.params=
|
||||
comment2.target=void\ moveLeftAndRight()
|
||||
comment3.params=
|
||||
comment3.target=void\ jump()
|
||||
comment4.params=
|
||||
comment4.target=void\ fall()
|
||||
numComments=5
|
||||
comment5.params=
|
||||
comment5.target=void\ shootProjectile()
|
||||
comment6.params=
|
||||
comment6.target=void\ collision()
|
||||
comment7.params=
|
||||
comment7.target=void\ checkHealth()
|
||||
comment8.params=
|
||||
comment8.target=void\ handlePowerUps()
|
||||
comment9.params=duration\ type
|
||||
comment9.target=void\ receivePowerUp(int,\ java.lang.String)
|
||||
numComments=11
|
||||
|
||||
@@ -1,9 +1,25 @@
|
||||
import greenfoot.*;
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class Player here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Player extends Actor
|
||||
{
|
||||
private int speed = 4;
|
||||
private int jumpStrength = 12;
|
||||
int MAX_HEALTH = 3;
|
||||
int health = MAX_HEALTH;
|
||||
|
||||
int jumpBoostDuration = -1;
|
||||
int jumpBoostStrength = 3;
|
||||
|
||||
boolean projectileReady = false;
|
||||
int projectileTimer;
|
||||
|
||||
private int speed = 6;
|
||||
private int currentJumpStrength;
|
||||
private int defaultJumpStrength = 15;
|
||||
private int gravity = 1;
|
||||
|
||||
private int verticalSpeed = 0;
|
||||
@@ -11,9 +27,26 @@ public class Player extends Actor
|
||||
|
||||
public void act()
|
||||
{
|
||||
collision();
|
||||
moveLeftAndRight();
|
||||
jump();
|
||||
fall();
|
||||
handlePowerUps();
|
||||
shootProjectile();
|
||||
checkHealth();
|
||||
playerRotation();
|
||||
|
||||
//Check ob der Spieler am unteren Fensterrand ist
|
||||
if (getY()+1 >= getWorld().getHeight()){
|
||||
MyWorld world = (MyWorld) getWorld();
|
||||
Greenfoot.setWorld(new GameOverWorld(world.score));
|
||||
}
|
||||
//Check ob der Spieler an der Seite vom Fenster ist
|
||||
if (getX() <= 0){
|
||||
setLocation(getWorld().getWidth(), getY());
|
||||
} else if (getX() >= getWorld().getWidth()-1){
|
||||
setLocation(1, getY());
|
||||
}
|
||||
}
|
||||
|
||||
// Bewegung nach links und rechts
|
||||
@@ -22,11 +55,13 @@ public class Player extends Actor
|
||||
if (Greenfoot.isKeyDown("a"))
|
||||
{
|
||||
setLocation(getX() - speed, getY());
|
||||
setImage("Player.png");
|
||||
}
|
||||
|
||||
if (Greenfoot.isKeyDown("d"))
|
||||
{
|
||||
setLocation(getX() + speed, getY());
|
||||
setImage("Player.png");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,40 +70,111 @@ public class Player extends Actor
|
||||
{
|
||||
if (Greenfoot.isKeyDown("space") && onGround)
|
||||
{
|
||||
verticalSpeed = -jumpStrength;
|
||||
verticalSpeed = -currentJumpStrength;
|
||||
onGround = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Schwerkraft und Boden-Kollision
|
||||
private void fall()
|
||||
{
|
||||
// Schwerkraft
|
||||
private void fall() {
|
||||
int oldY = getY();
|
||||
verticalSpeed += gravity;
|
||||
|
||||
int newY = getY() + verticalSpeed;
|
||||
|
||||
// Prüfen, ob wir auf Ground landen
|
||||
setLocation(getX(), newY);
|
||||
|
||||
Actor ground = getOneIntersectingObject(Ground.class);
|
||||
|
||||
if (ground != null)
|
||||
{
|
||||
// Wenn wir fallen, stehen wir auf dem Ground
|
||||
if (verticalSpeed >= 0)
|
||||
{
|
||||
int groundTop = ground.getY() - ground.getImage().getHeight() / 2;
|
||||
int characterHalfHeight = getImage().getHeight() / 2;
|
||||
|
||||
setLocation(getX(), groundTop - characterHalfHeight);
|
||||
|
||||
// Alle Plattformen überprüfen, die der Spieler berührt
|
||||
java.util.List<Plattform> platforms = getIntersectingObjects(Plattform.class);
|
||||
boolean landed = false;
|
||||
for (Plattform platform : platforms) {
|
||||
int groundTop = platform.getY() - platform.getImage().getHeight() / 2;
|
||||
int characterBottom = getY() + getImage().getHeight() / 2;
|
||||
int oldCharacterBottom = oldY + getImage().getHeight() / 2;
|
||||
// Prüfen, ob der Spieler von oben auf diese Plattform fällt
|
||||
if (verticalSpeed >= 0 && oldCharacterBottom <= groundTop && characterBottom >= groundTop) {
|
||||
setLocation( getX(), groundTop - getImage().getHeight() / 2 );
|
||||
verticalSpeed = 0;
|
||||
onGround = true;
|
||||
landed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
onGround = landed;
|
||||
}
|
||||
|
||||
public void shootProjectile(){
|
||||
projectileTimer++;
|
||||
MouseInfo mouse = Greenfoot.getMouseInfo();
|
||||
if (Greenfoot.mousePressed(null)){
|
||||
PlayerProjectile playerProjectile = new PlayerProjectile();
|
||||
getWorld().addObject(playerProjectile, getX(), getY());
|
||||
playerProjectile.turnTowards(Greenfoot.getMouseInfo().getX(), Greenfoot.getMouseInfo().getY());
|
||||
projectileReady = false;
|
||||
}
|
||||
if (projectileTimer >= 10){
|
||||
projectileReady = true;
|
||||
projectileTimer = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public void collision(){
|
||||
if (getIntersectingObjects(Projectile.class).size()>0
|
||||
|| getIntersectingObjects(Enemy.class).size()>0
|
||||
|| getIntersectingObjects(Spike.class).size()>0)
|
||||
{
|
||||
health--;
|
||||
getWorld().removeObjects(getIntersectingObjects(Projectile.class));
|
||||
getWorld().removeObjects(getIntersectingObjects(Enemy.class));
|
||||
getWorld().removeObjects(getWorld().getObjects(Spike.class));
|
||||
}
|
||||
}
|
||||
|
||||
public void checkHealth(){
|
||||
if (health <= 0){
|
||||
MyWorld world = (MyWorld) getWorld();
|
||||
Greenfoot.setWorld(new GameOverWorld(world.score));
|
||||
}
|
||||
}
|
||||
|
||||
public void handlePowerUps(){
|
||||
if (jumpBoostDuration >= 0){
|
||||
jumpBoostDuration -= 1;
|
||||
} else if (jumpBoostDuration <= -1){
|
||||
currentJumpStrength = defaultJumpStrength;
|
||||
}
|
||||
}
|
||||
|
||||
public void receivePowerUp(int duration, String type){
|
||||
switch(type){
|
||||
case "dummy":
|
||||
break;
|
||||
case "JumpBoost":
|
||||
currentJumpStrength = defaultJumpStrength;
|
||||
currentJumpStrength += jumpBoostStrength;
|
||||
jumpBoostDuration = duration;
|
||||
break;
|
||||
case "Heal":
|
||||
if (health < MAX_HEALTH){
|
||||
health++;
|
||||
}
|
||||
break;
|
||||
case "GroundPower":
|
||||
World theWorld= this.getWorld();
|
||||
if(!theWorld.getObjects(TemporaryGround.class).isEmpty())
|
||||
{
|
||||
theWorld.getObjects(TemporaryGround.class).get(0).RefreshLifeToDuration(duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
onGround = false;
|
||||
theWorld.addObject((new TemporaryGround(duration)), 200, 575);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void playerRotation(){
|
||||
if(Greenfoot.isKeyDown("a")){
|
||||
setImage("PlayerLeft.png");
|
||||
}
|
||||
if(Greenfoot.isKeyDown("d")){
|
||||
setImage("Player.png");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#BlueJ class context
|
||||
comment0.target=PlayerProjectile
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ PlayerProjectile\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ PlayerProjectile\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment2.params=
|
||||
comment2.target=void\ checkForEnemyCollision()
|
||||
comment3.params=
|
||||
comment3.target=boolean\ isProjectileOnScreen()
|
||||
numComments=4
|
||||
@@ -0,0 +1,43 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class PlayerProjectile here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class PlayerProjectile extends Actor
|
||||
{
|
||||
boolean deleteAfterActCycle = false;
|
||||
/**
|
||||
* Act - do whatever the PlayerProjectile wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
move(7);
|
||||
checkForEnemyCollision();
|
||||
if (deleteAfterActCycle || !isProjectileOnScreen()){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void checkForEnemyCollision(){
|
||||
if (getOneIntersectingObject(Enemy.class) != null){
|
||||
getWorld().removeObject(getOneIntersectingObject(Enemy.class));
|
||||
deleteAfterActCycle = true;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isProjectileOnScreen(){
|
||||
//Check Y-Value
|
||||
if (getY() <= 0 || getY() >= getWorld().getHeight()-1){
|
||||
return false;
|
||||
}
|
||||
//Check X-Value
|
||||
if (getX() <= 0 || getX() >= getWorld().getWidth()-1){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ public class PlayerTestWorld extends World
|
||||
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.
|
||||
@@ -29,5 +30,7 @@ public class PlayerTestWorld extends World
|
||||
addObject(ground,260,375);
|
||||
Player player = new Player();
|
||||
addObject(player,264,237);
|
||||
JumpBoostItem jumpBoostItem = new JumpBoostItem();
|
||||
addObject(jumpBoostItem,206,200);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#BlueJ class context
|
||||
comment0.target=PowerUps
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ PowerUps\ 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\ touchedByPlayer()
|
||||
comment3.params=
|
||||
comment3.target=void\ collect()
|
||||
comment4.params=
|
||||
comment4.target=void\ moveDown()
|
||||
numComments=5
|
||||
@@ -0,0 +1,43 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class PowerUps here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class PowerUps extends Actor
|
||||
{
|
||||
int duration;
|
||||
boolean deleteAfterActCycle = false;
|
||||
|
||||
public void act()
|
||||
{
|
||||
moveDown();
|
||||
touchedByPlayer();
|
||||
if (deleteAfterActCycle){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void touchedByPlayer(){
|
||||
if (getIntersectingObjects(Player.class).size() > 0){
|
||||
collect();
|
||||
deleteAfterActCycle = true;
|
||||
}
|
||||
}
|
||||
|
||||
void collect(){
|
||||
Player player = getIntersectingObjects(Player.class).get(0);
|
||||
player.receivePowerUp(duration, "dummy");
|
||||
}
|
||||
|
||||
public void moveDown()
|
||||
{
|
||||
setLocation(this.getX(), this.getY()+2);
|
||||
if(this.getY() >= getWorld().getHeight()-1)
|
||||
{
|
||||
deleteAfterActCycle = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Projectile
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Projectile\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ Projectile\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment2.params=
|
||||
comment2.target=void\ falling()
|
||||
numComments=3
|
||||
@@ -0,0 +1,26 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class Projectile here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Projectile extends Actor
|
||||
{
|
||||
/**
|
||||
* Act - do whatever the Projectile wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
falling();
|
||||
}
|
||||
|
||||
public void falling(){
|
||||
setLocation(getX(), getY() + 5);
|
||||
if(getY() > getWorld().getHeight() -5){
|
||||
getWorld().removeObject(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Score
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ UI\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ UI\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
numComments=2
|
||||
@@ -0,0 +1,20 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class UI here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Score extends Actor
|
||||
{
|
||||
|
||||
/**
|
||||
* Act - do whatever the UI wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#BlueJ class context
|
||||
comment0.target=Spike
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ Spike\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
|
||||
comment1.params=pSpeed
|
||||
comment1.target=Spike(int)
|
||||
comment2.params=
|
||||
comment2.target=void\ act()
|
||||
comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ Spike\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment3.params=
|
||||
comment3.target=void\ loescheMich()
|
||||
comment4.params=
|
||||
comment4.target=void\ bewege()
|
||||
numComments=5
|
||||
@@ -0,0 +1,41 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class Spike here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class Spike extends Actor
|
||||
{
|
||||
int speed;
|
||||
public Spike(int pSpeed)
|
||||
{
|
||||
speed=pSpeed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Act - do whatever the Spike wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
this.bewege();
|
||||
}
|
||||
|
||||
public void loescheMich()
|
||||
{
|
||||
MyWorld theWorld= (MyWorld) this.getWorld();
|
||||
theWorld.removeObject(this);
|
||||
}
|
||||
|
||||
public void bewege()
|
||||
{
|
||||
this.setLocation(this.getX(), this.getY()+speed);
|
||||
MyWorld theWorld= (MyWorld) this.getWorld();
|
||||
if(this.getY()>=theWorld.getHeight()-5)
|
||||
{
|
||||
this.loescheMich();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#BlueJ class context
|
||||
comment0.target=SpikedPlattform
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ SpikedPlattform\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
|
||||
comment1.params=pSpikeCountdown
|
||||
comment1.target=SpikedPlattform(int)
|
||||
comment2.params=
|
||||
comment2.target=void\ act()
|
||||
comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ SpikedPlattform\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment3.params=
|
||||
comment3.target=void\ activateSpikes()
|
||||
comment4.params=
|
||||
comment4.target=void\ spikeTheSurface()
|
||||
numComments=5
|
||||
@@ -0,0 +1,63 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class SpikedPlattform here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class SpikedPlattform extends Plattform
|
||||
{
|
||||
int SpikeCountdown;
|
||||
boolean spikesActivated=false;
|
||||
boolean isSpiked=false;
|
||||
Spike[] hasSpikes= new Spike[5];
|
||||
public SpikedPlattform(int pSpikeCountdown)
|
||||
{
|
||||
SpikeCountdown=pSpikeCountdown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Act - do whatever the SpikedPlattform wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
// Add your action code here.
|
||||
if(this.PlayerOnPlattform() && spikesActivated== false)
|
||||
{
|
||||
this.activateSpikes();
|
||||
}
|
||||
if(spikesActivated)
|
||||
{
|
||||
SpikeCountdown--;
|
||||
}
|
||||
if(SpikeCountdown==0)
|
||||
{
|
||||
this.spikeTheSurface();
|
||||
}
|
||||
super.act();
|
||||
}
|
||||
|
||||
public void activateSpikes()
|
||||
{
|
||||
spikesActivated=true;
|
||||
MyWorld theWorld= (MyWorld) this.getWorld();
|
||||
for(int i=-6; i<7; i++)
|
||||
{
|
||||
theWorld.addObject(new UnactiveSpike(2,SpikeCountdown, this ), this.getX()+i* (this.getImage().getWidth()/13), this.getY()-(this.getImage().getHeight()/2));
|
||||
}
|
||||
//Sound
|
||||
//setImage
|
||||
|
||||
}
|
||||
|
||||
public void spikeTheSurface()
|
||||
{
|
||||
isSpiked=true;
|
||||
|
||||
//Soun)
|
||||
//setImage
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#BlueJ class context
|
||||
comment0.target=StartWorld
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ StartWorld\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
|
||||
comment1.params=
|
||||
comment1.target=StartWorld()
|
||||
comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ StartWorld.\r\n\ \r\n
|
||||
comment2.params=
|
||||
comment2.target=void\ prepare()
|
||||
comment2.text=\r\n\ Prepare\ the\ world\ for\ the\ start\ of\ the\ program.\r\n\ That\ is\:\ create\ the\ initial\ objects\ and\ add\ them\ to\ the\ world.\r\n
|
||||
numComments=3
|
||||
@@ -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,310);
|
||||
button.setImage("Start.png");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#BlueJ class context
|
||||
comment0.target=TargetingProjectile
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ TargetingProjectile\ 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()
|
||||
comment1.text=\r\n\ Act\ -\ do\ whatever\ the\ TargetingProjectile\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment2.params=
|
||||
comment2.target=void\ targetPlayer()
|
||||
numComments=3
|
||||
@@ -0,0 +1,32 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class TargetingProjectile here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class TargetingProjectile extends Projectile
|
||||
{
|
||||
/**
|
||||
* Act - do whatever the TargetingProjectile wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
targetPlayer();
|
||||
falling();
|
||||
}
|
||||
|
||||
public void targetPlayer(){
|
||||
Player player = (Player) getWorld().getObjects(Player.class).get(0);
|
||||
int playerX = player.getX();
|
||||
int playerY = player.getY();
|
||||
turnTowards(playerX, playerY);
|
||||
move(1);
|
||||
if(getY() > playerY){
|
||||
setLocation(getX(),getY()+5);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#BlueJ class context
|
||||
comment0.target=TemporaryGround
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ TemporaryGround\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
|
||||
comment1.params=pLebensdauer
|
||||
comment1.target=TemporaryGround(int)
|
||||
comment2.params=
|
||||
comment2.target=void\ act()
|
||||
comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ TemporaryGround\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment3.params=
|
||||
comment3.target=void\ warning()
|
||||
comment4.params=
|
||||
comment4.target=void\ noMoreWarning()
|
||||
comment5.params=pDuration
|
||||
comment5.target=void\ RefreshLifeToDuration(int)
|
||||
comment6.params=
|
||||
comment6.target=void\ Buffer()
|
||||
numComments=7
|
||||
@@ -0,0 +1,71 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class TemporaryGround here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class TemporaryGround extends Plattform
|
||||
{
|
||||
private int Lebensdauer;
|
||||
boolean warningHasHappend=false;
|
||||
boolean deWarningHasHappend=true;
|
||||
public TemporaryGround(int pLebensdauer)
|
||||
{
|
||||
Lebensdauer=pLebensdauer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Act - do whatever the TemporaryGround wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
// Add your action code here.
|
||||
this.Buffer();
|
||||
Lebensdauer--;
|
||||
if(Lebensdauer==0)
|
||||
{
|
||||
this.loescheMich();
|
||||
}
|
||||
if(Lebensdauer<60*3 && warningHasHappend==false) //3 Sekunden
|
||||
{
|
||||
this.warning();
|
||||
}
|
||||
if(Lebensdauer>=60*3 && deWarningHasHappend==false)
|
||||
{
|
||||
this.noMoreWarning();
|
||||
}
|
||||
}
|
||||
|
||||
public void warning()
|
||||
{
|
||||
this.setImage("BreakingGround.png");
|
||||
warningHasHappend=true;
|
||||
deWarningHasHappend=false;
|
||||
}
|
||||
|
||||
public void noMoreWarning()
|
||||
{
|
||||
this.setImage("Ground.png");
|
||||
warningHasHappend=false;
|
||||
deWarningHasHappend=true;
|
||||
}
|
||||
|
||||
public void RefreshLifeToDuration(int pDuration)
|
||||
{
|
||||
Lebensdauer=pDuration;
|
||||
}
|
||||
|
||||
public void Buffer()
|
||||
{
|
||||
{
|
||||
Player player= this.getWorld().getObjects(Player.class).get(0);
|
||||
if(this.intersects(player))
|
||||
{
|
||||
player.setLocation(player.getX(), this.getY()-this.getImage().getHeight()-5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#BlueJ class context
|
||||
comment0.target=UnactiveSpike
|
||||
comment0.text=\r\n\ Write\ a\ description\ of\ class\ UnactiveSpike\ here.\r\n\ \r\n\ @author\ (your\ name)\ \r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n
|
||||
comment1.params=pSpeed\ pCoundown\ pPlattform
|
||||
comment1.target=UnactiveSpike(int,\ int,\ SpikedPlattform)
|
||||
comment2.params=
|
||||
comment2.target=void\ act()
|
||||
comment2.text=\r\n\ Act\ -\ do\ whatever\ the\ UnactiveSpike\ wants\ to\ do.\ This\ method\ is\ called\ whenever\r\n\ the\ 'Act'\ or\ 'Run'\ button\ gets\ pressed\ in\ the\ environment.\r\n
|
||||
comment3.params=
|
||||
comment3.target=void\ loescheMich()
|
||||
comment4.params=
|
||||
comment4.target=void\ bewege()
|
||||
numComments=5
|
||||
@@ -0,0 +1,58 @@
|
||||
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
|
||||
|
||||
/**
|
||||
* Write a description of class UnactiveSpike here.
|
||||
*
|
||||
* @author (your name)
|
||||
* @version (a version number or a date)
|
||||
*/
|
||||
public class UnactiveSpike extends Actor
|
||||
{
|
||||
int countdown;
|
||||
int speed;
|
||||
boolean geloescht=false;
|
||||
public UnactiveSpike(int pSpeed, int pCoundown, SpikedPlattform pPlattform)
|
||||
{
|
||||
speed=pSpeed;
|
||||
countdown=pCoundown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Act - do whatever the UnactiveSpike wants to do. This method is called whenever
|
||||
* the 'Act' or 'Run' button gets pressed in the environment.
|
||||
*/
|
||||
public void act()
|
||||
{
|
||||
this.bewege();
|
||||
countdown--;
|
||||
if(countdown==0)
|
||||
{
|
||||
MyWorld theWorld= (MyWorld) this.getWorld();
|
||||
Spike BeispielSpike=new Spike(1);
|
||||
GreenfootImage SpikeImage= BeispielSpike.getImage();
|
||||
theWorld.addObject(new Spike(speed), this.getX(), (this.getY()- this.getImage().getHeight()/2)-2); //die Zahl Minus damit ist endlich passt
|
||||
geloescht=true;
|
||||
}
|
||||
if(geloescht)
|
||||
{
|
||||
this.loescheMich();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void loescheMich()
|
||||
{
|
||||
MyWorld theWorld= (MyWorld) this.getWorld();
|
||||
theWorld.removeObject(this);
|
||||
}
|
||||
|
||||
public void bewege()
|
||||
{
|
||||
this.setLocation(this.getX(), this.getY()+speed);
|
||||
MyWorld theWorld= (MyWorld) this.getWorld();
|
||||
if(this.getY()>=theWorld.getHeight()-5)
|
||||
{
|
||||
geloescht=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (21) on Wed Sep 16 11:08:05 CEST 2026 -->
|
||||
<title>Score</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2026-09-16">
|
||||
<meta name="description" content="declaration: class: Score">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript"></script>
|
||||
<noscript>
|
||||
<div>JavaScript ist im Browser deaktiviert.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<h1 title="Klasse Score" class="title">Klasse Score</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Vererbungsbaum"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">java.lang.Object</a>
|
||||
<div class="inheritance">greenfoot.Actor
|
||||
<div class="inheritance">Score</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="class-description" id="class-description">
|
||||
<hr>
|
||||
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">Score</span>
|
||||
<span class="extends-implements">extends greenfoot.Actor</span></div>
|
||||
<div class="block">Write a description of class UI here.</div>
|
||||
<dl class="notes">
|
||||
<dt>Version:</dt>
|
||||
<dd>(a version number or a date)</dd>
|
||||
<dt>Autor:</dt>
|
||||
<dd>(your name)</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor-summary">
|
||||
<h2>Konstruktorübersicht</h2>
|
||||
<div class="caption"><span>Konstruktoren</span></div>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Konstruktor</div>
|
||||
<div class="table-header col-last">Beschreibung</div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">Score</a>()</code></div>
|
||||
<div class="col-last even-row-color"> </div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method-summary">
|
||||
<h2>Methodenübersicht</h2>
|
||||
<div id="method-summary-table">
|
||||
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">Alle Methoden</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instanzmethoden</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Konkrete Methoden</button></div>
|
||||
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
|
||||
<div class="summary-table three-column-summary">
|
||||
<div class="table-header col-first">Modifizierer und Typ</div>
|
||||
<div class="table-header col-second">Methode</div>
|
||||
<div class="table-header col-last">Beschreibung</div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#act()" class="member-name-link">act</a>()</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
|
||||
<div class="block">Act - do whatever the UI wants to do.</div>
|
||||
</div>
|
||||
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
|
||||
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#calculate_score()" class="member-name-link">calculate_score</a>()</code></div>
|
||||
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
||||
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
|
||||
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#draw_score()" class="member-name-link">draw_score</a>()</code></div>
|
||||
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods-inherited-from-class-greenfoot.Actor">Von Klasse geerbte Methoden greenfoot.Actor</h3>
|
||||
<code>addedToWorld, getImage, getIntersectingObjects, getNeighbours, getObjectsAtOffset, getObjectsInRange, getOneIntersectingObject, getOneObjectAtOffset, getRotation, getWorld, getWorldOfType, getX, getY, intersects, isAtEdge, isTouching, move, removeTouching, setImage, setImage, setLocation, setRotation, sleepFor, turn, turnTowards</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods-inherited-from-class-java.lang.Object">Von Klasse geerbte Methoden java.lang.<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">Object</a></h3>
|
||||
<code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#clone()" title="Klasse oder Schnittstelle in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="Klasse oder Schnittstelle in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#getClass()" title="Klasse oder Schnittstelle in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#hashCode()" title="Klasse oder Schnittstelle in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notify()" title="Klasse oder Schnittstelle in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notifyAll()" title="Klasse oder Schnittstelle in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#toString()" title="Klasse oder Schnittstelle in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait()" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long)" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<li>
|
||||
<section class="constructor-details" id="constructor-detail">
|
||||
<h2>Konstruktordetails</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>()">
|
||||
<h3>Score</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">Score</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ============ METHOD DETAIL ========== -->
|
||||
<li>
|
||||
<section class="method-details" id="method-detail">
|
||||
<h2>Methodendetails</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="act()">
|
||||
<h3>act</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">act</span>()</div>
|
||||
<div class="block">Act - do whatever the UI wants to do. This method is called whenever
|
||||
the 'Act' or 'Run' button gets pressed in the environment.</div>
|
||||
<dl class="notes">
|
||||
<dt>Setzt außer Kraft:</dt>
|
||||
<dd><code>act</code> in Klasse <code>greenfoot.Actor</code></dd>
|
||||
</dl>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="draw_score()">
|
||||
<h3>draw_score</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">draw_score</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
<li>
|
||||
<section class="detail" id="calculate_score()">
|
||||
<h3>calculate_score</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">calculate_score</span>()</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,98 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (21) on Tue Sep 15 12:14:29 CEST 2026 -->
|
||||
<title>StartWorld</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2026-09-15">
|
||||
<meta name="description" content="declaration: class: StartWorld">
|
||||
<meta name="generator" content="javadoc/ClassWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body class="class-declaration-page">
|
||||
<script type="text/javascript"></script>
|
||||
<noscript>
|
||||
<div>JavaScript ist im Browser deaktiviert.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<!-- ======== START OF CLASS DATA ======== -->
|
||||
<div class="header">
|
||||
<h1 title="Klasse StartWorld" class="title">Klasse StartWorld</h1>
|
||||
</div>
|
||||
<div class="inheritance" title="Vererbungsbaum"><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">java.lang.Object</a>
|
||||
<div class="inheritance">greenfoot.World
|
||||
<div class="inheritance">StartWorld</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="class-description" id="class-description">
|
||||
<hr>
|
||||
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">StartWorld</span>
|
||||
<span class="extends-implements">extends greenfoot.World</span></div>
|
||||
<div class="block">Write a description of class StartWorld here.</div>
|
||||
<dl class="notes">
|
||||
<dt>Version:</dt>
|
||||
<dd>(a version number or a date)</dd>
|
||||
<dt>Autor:</dt>
|
||||
<dd>(your name)</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
||||
<li>
|
||||
<section class="constructor-summary" id="constructor-summary">
|
||||
<h2>Konstruktorübersicht</h2>
|
||||
<div class="caption"><span>Konstruktoren</span></div>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Konstruktor</div>
|
||||
<div class="table-header col-last">Beschreibung</div>
|
||||
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">StartWorld</a>()</code></div>
|
||||
<div class="col-last even-row-color">
|
||||
<div class="block">Constructor for objects of class StartWorld.</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</li>
|
||||
<!-- ========== METHOD SUMMARY =========== -->
|
||||
<li>
|
||||
<section class="method-summary" id="method-summary">
|
||||
<h2>Methodenübersicht</h2>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods-inherited-from-class-greenfoot.World">Von Klasse geerbte Methoden greenfoot.World</h3>
|
||||
<code>act, addObject, getBackground, getCellSize, getColorAt, getHeight, getObjects, getObjectsAt, getWidth, numberOfObjects, removeObject, removeObjects, repaint, setActOrder, setBackground, setBackground, setPaintOrder, showText, started, stopped</code></div>
|
||||
<div class="inherited-list">
|
||||
<h3 id="methods-inherited-from-class-java.lang.Object">Von Klasse geerbte Methoden java.lang.<a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html" title="Klasse oder Schnittstelle in java.lang" class="external-link">Object</a></h3>
|
||||
<code><a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#clone()" title="Klasse oder Schnittstelle in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="Klasse oder Schnittstelle in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#getClass()" title="Klasse oder Schnittstelle in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#hashCode()" title="Klasse oder Schnittstelle in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notify()" title="Klasse oder Schnittstelle in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#notifyAll()" title="Klasse oder Schnittstelle in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#toString()" title="Klasse oder Schnittstelle in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait()" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long)" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="Klasse oder Schnittstelle in java.lang" class="external-link">wait</a></code></div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="details">
|
||||
<ul class="details-list">
|
||||
<!-- ========= CONSTRUCTOR DETAIL ======== -->
|
||||
<li>
|
||||
<section class="constructor-details" id="constructor-detail">
|
||||
<h2>Konstruktordetails</h2>
|
||||
<ul class="member-list">
|
||||
<li>
|
||||
<section class="detail" id="<init>()">
|
||||
<h3>StartWorld</h3>
|
||||
<div class="member-signature"><span class="modifiers">public</span> <span class="element-name">StartWorld</span>()</div>
|
||||
<div class="block">Constructor for objects of class StartWorld.</div>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- ========= END OF CLASS DATA ========= -->
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License version 2 only, as
|
||||
published by the Free Software Foundation. Oracle designates this
|
||||
particular file as subject to the "Classpath" exception as provided
|
||||
by Oracle in the LICENSE file that accompanied this code.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
version 2 for more details (a copy is included in the LICENSE file that
|
||||
accompanied this code).
|
||||
|
||||
You should have received a copy of the GNU General Public License version
|
||||
2 along with this work; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
or visit www.oracle.com if you need additional information or have any
|
||||
questions.
|
||||
-->
|
||||
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 460" fill="#505050">
|
||||
<path
|
||||
d="M 346,8 H 108 C 90,8 75,23 75,41 v 316 c 0,18 15,33 33,33 h 238 c 18,0 33,-15 33,-33 V 41 C 379,23 364,8 346,8 Z m -8,344 H 116 c -2,0 -3,-1 -3,-3 V 49 c 0,-2 1,-3 3,-3 h 222 c 2,0 3,1 3,3 v 300 h 10e-4 c 0,2 -1,3 -3,3 z"/>
|
||||
<path
|
||||
d="m 290,389 v 26 h 10e-4 c 0,2 -1,3 -3,3 H 49 c -2,0 -3,-1 -3,-3 V 99 c 0,-2 1,-3 3,-3 h 27 v 0 l -5e-4,-38 H 41 C 23,58 8,73 8,91 v 332 c 10e-4,18 15,33 33,33 h 254 c 18,0 33,-15 33,-33 v -34"/>
|
||||
</svg>
|
||||
@@ -0,0 +1 @@
|
||||
Unbenanntes Package
|
||||
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (21) on Wed Sep 16 11:08:05 CEST 2026 -->
|
||||
<title>Generierte Dokumentation (unbenannt)</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2026-09-16">
|
||||
<meta name="description" content="index redirect">
|
||||
<meta name="generator" content="javadoc/IndexRedirectWriter">
|
||||
<link rel="canonical" href="package-summary.html">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript">window.location.replace('package-summary.html')</script>
|
||||
<noscript>
|
||||
<meta http-equiv="Refresh" content="0;package-summary.html">
|
||||
</noscript>
|
||||
</head>
|
||||
<body class="index-redirect-page">
|
||||
<main role="main">
|
||||
<noscript>
|
||||
<p>JavaScript ist im Browser deaktiviert.</p>
|
||||
</noscript>
|
||||
<p><a href="package-summary.html">package-summary.html</a></p>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1 @@
|
||||
Please see ..\java.base\ADDITIONAL_LICENSE_INFO
|
||||
@@ -0,0 +1 @@
|
||||
Please see ..\java.base\ASSEMBLY_EXCEPTION
|
||||
@@ -0,0 +1 @@
|
||||
Please see ..\java.base\LICENSE
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
|
||||
This code is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License version 2 only, as
|
||||
published by the Free Software Foundation. Oracle designates this
|
||||
particular file as subject to the "Classpath" exception as provided
|
||||
by Oracle in the LICENSE file that accompanied this code.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
version 2 for more details (a copy is included in the LICENSE file that
|
||||
accompanied this code).
|
||||
|
||||
You should have received a copy of the GNU General Public License version
|
||||
2 along with this work; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
or visit www.oracle.com if you need additional information or have any
|
||||
questions.
|
||||
-->
|
||||
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="#505050">
|
||||
<path d="M32 239.3c18.2 16.7 57.1 15.4 74.5-1.7l30.9-32c8.3-8.8 4.8-15.1.7-19.9-4.7-3-12-8.1-20.4.5l-29.4 29.6a29.4 29.4 0 0 1-39.4.9l-8-7c-8.8-9.4-11-28.3-.8-38.8l49.8-51.3c7.2-6.6 21.3-10 36.1-2.4 6.9 5.4 15.6 15.7 26 6.2 9.9-11.2 2.9-20.4-10-29.3-18.7-12.6-52-14.8-70.4 3.8L17 154.2c-20 20.2-11.3 58 1.7 71.5a69 69 0 0 0 13.2 13.6z"/>
|
||||
<path d="M223.2 17.5c-18.4-16.6-57.3-15.3-74.6 2l-30.8 31.9c-8.3 9-4.8 15.2-.7 20 4.8 3 12.1 8 20.5-.6 4.8-5 29.3-29.6 29.3-29.6a29.4 29.4 0 0 1 39.4-1l8 6.8c8.8 9.5 11 28.3.9 38.9l-49.6 51.4c-7.2 6.7-21.3 10.1-36.1 2.6-7-5.4-15.7-15.7-26.1-6.2-9.8 11.2-2.8 20.4 10.2 29.3 18.7 12.5 52 14.7 70.3-4l54.4-56.5c20-20.3 11.2-58-1.9-71.5a69 69 0 0 0-13.2-13.5Z"/>
|
||||
</svg>
|
||||
@@ -0,0 +1,35 @@
|
||||
Class documentation
|
||||
<---- javadoc command: ---->
|
||||
C:\Program Files\Greenfoot\jdk\bin\javadoc.exe
|
||||
-author
|
||||
-version
|
||||
-nodeprecated
|
||||
-protected
|
||||
-Xdoclint:none
|
||||
-noindex
|
||||
-notree
|
||||
-nohelp
|
||||
-nonavbar
|
||||
-source
|
||||
21
|
||||
-classpath
|
||||
C:\Program Files\Greenfoot\lib\greenfoot.jar;C:\Program Files\Greenfoot\lib\javafx-base-21.0.3-win.jar;C:\Program Files\Greenfoot\lib\javafx-controls-21.0.3-win.jar;C:\Program Files\Greenfoot\lib\javafx-fxml-21.0.3-win.jar;C:\Program Files\Greenfoot\lib\javafx-graphics-21.0.3-win.jar;C:\Program Files\Greenfoot\lib\javafx-media-21.0.3-win.jar;C:\Program Files\Greenfoot\lib\javafx-swing-21.0.3-win.jar;C:\Program Files\Greenfoot\lib\javafx-web-21.0.3-win.jar;C:\Program Files\Greenfoot\lib\junit-4.12.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-api-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-engine-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-jupiter-params-5.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-commons-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-engine-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-launcher-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-platform-suite-api-1.5.2.jar;C:\Program Files\Greenfoot\lib\junit-vintage-engine-5.5.2.jar;C:\Program Files\Greenfoot\lib\hamcrest-core-1.3.jar;C:\Program Files\Greenfoot\lib\opentest4j-1.2.0.jar;C:\Program Files\Greenfoot\lib\bluej.jar;C:\Program Files\Greenfoot\lib\classgraph-4.8.90.jar;C:\Program Files\Greenfoot\lib\diffutils-1.2.1.jar;C:\Program Files\Greenfoot\lib\commons-logging-1.2.jar;C:\Program Files\Greenfoot\lib\jl1.0.1.jar;C:\Program Files\Greenfoot\lib\opencsv-2.3.jar;C:\Program Files\Greenfoot\lib\opencsv-2.4.jar;C:\Program Files\Greenfoot\lib\xom-1.3.9.jar;C:\Program Files\Greenfoot\lib\lang-stride.jar;C:\Program Files\Greenfoot\lib\nsmenufx-3.1.0.jar;C:\Program Files\Greenfoot\lib\wellbehavedfx-0.3.3.jar;C:\Program Files\Greenfoot\lib\guava-33.3.1-jre.jar;C:\Program Files\Greenfoot\lib\failureaccess-1.0.2.jar;C:\Program Files\Greenfoot\lib\simple-png-0.2.0.jar;C:\Program Files\Greenfoot\lib\simple-png-javafx-0.2.0.jar;C:\Program Files\Greenfoot\lib\httpclient-4.5.13.jar;C:\Program Files\Greenfoot\lib\httpcore-4.4.13.jar;C:\Program Files\Greenfoot\lib\httpmime-4.1.1.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.base.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.controls.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.fxml.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.graphics.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.media.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.properties.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.swing.jar;C:\Program Files\Greenfoot\lib\javafx\javafx.web.jar;C:\Users\Marlie\Documents\Workspace\SMIMS_2026_2\SMIMS-Game
|
||||
-d
|
||||
C:\Users\Marlie\Documents\Workspace\SMIMS_2026_2\SMIMS-Game\doc
|
||||
-encoding
|
||||
UTF-8
|
||||
-charset
|
||||
UTF-8
|
||||
C:\Users\Marlie\Documents\Workspace\SMIMS_2026_2\SMIMS-Game\Score.java
|
||||
<---- end of javadoc command ---->
|
||||
Quelldatei C:\Users\Marlie\Documents\Workspace\SMIMS_2026_2\SMIMS-Game\Score.java wird geladen...
|
||||
Javadoc-Informationen werden erstellt...
|
||||
Warnung: Unbekannte Enum-Konstante Tag.Any
|
||||
Grund: Klassendatei für threadchecker.Tag nicht gefunden
|
||||
Warnung: Unbekannte Enum-Konstante Tag.Any
|
||||
Standard-Doclet-Version 21.0.4+7-LTS
|
||||
Baum für alle Packages und Klassen wird erstellt...
|
||||
C:\Users\Marlie\Documents\Workspace\SMIMS_2026_2\SMIMS-Game\doc\Score.html wird generiert...
|
||||
C:\Users\Marlie\Documents\Workspace\SMIMS_2026_2\SMIMS-Game\doc\package-summary.html wird generiert...
|
||||
C:\Users\Marlie\Documents\Workspace\SMIMS_2026_2\SMIMS-Game\doc\index.html wird generiert...
|
||||
2 Warnungen
|
||||
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<!-- Generated by javadoc (21) on Wed Sep 16 11:08:05 CEST 2026 -->
|
||||
<title>Unbenanntes Package</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="dc.created" content="2026-09-16">
|
||||
<meta name="description" content="declaration: package: <unnamed>">
|
||||
<meta name="generator" content="javadoc/PackageWriterImpl">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body class="package-declaration-page">
|
||||
<script type="text/javascript"></script>
|
||||
<noscript>
|
||||
<div>JavaScript ist im Browser deaktiviert.</div>
|
||||
</noscript>
|
||||
<div class="flex-box">
|
||||
<div class="flex-content">
|
||||
<main role="main">
|
||||
<div class="header">
|
||||
<h1 title="Unbenanntes Package" class="title">Unbenanntes Package</h1>
|
||||
</div>
|
||||
<hr>
|
||||
<section class="summary">
|
||||
<ul class="summary-list">
|
||||
<li>
|
||||
<div id="class-summary">
|
||||
<div class="caption"><span>Klassen</span></div>
|
||||
<div class="summary-table two-column-summary">
|
||||
<div class="table-header col-first">Klasse</div>
|
||||
<div class="table-header col-last">Beschreibung</div>
|
||||
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="Score.html" title="Klasse in Unbenanntes Package">Score</a></div>
|
||||
<div class="col-last even-row-color class-summary class-summary-tab2">
|
||||
<div class="block">Write a description of class UI here.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,253 @@
|
||||
/*
|
||||
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
var moduleSearchIndex;
|
||||
var packageSearchIndex;
|
||||
var typeSearchIndex;
|
||||
var memberSearchIndex;
|
||||
var tagSearchIndex;
|
||||
|
||||
var oddRowColor = "odd-row-color";
|
||||
var evenRowColor = "even-row-color";
|
||||
var sortAsc = "sort-asc";
|
||||
var sortDesc = "sort-desc";
|
||||
var tableTab = "table-tab";
|
||||
var activeTableTab = "active-table-tab";
|
||||
|
||||
function loadScripts(doc, tag) {
|
||||
createElem(doc, tag, 'search.js');
|
||||
|
||||
createElem(doc, tag, 'module-search-index.js');
|
||||
createElem(doc, tag, 'package-search-index.js');
|
||||
createElem(doc, tag, 'type-search-index.js');
|
||||
createElem(doc, tag, 'member-search-index.js');
|
||||
createElem(doc, tag, 'tag-search-index.js');
|
||||
}
|
||||
|
||||
function createElem(doc, tag, path) {
|
||||
var script = doc.createElement(tag);
|
||||
var scriptElement = doc.getElementsByTagName(tag)[0];
|
||||
script.src = pathtoroot + path;
|
||||
scriptElement.parentNode.insertBefore(script, scriptElement);
|
||||
}
|
||||
|
||||
// Helper for making content containing release names comparable lexicographically
|
||||
function makeComparable(s) {
|
||||
return s.toLowerCase().replace(/(\d+)/g,
|
||||
function(n, m) {
|
||||
return ("000" + m).slice(-4);
|
||||
});
|
||||
}
|
||||
|
||||
// Switches between two styles depending on a condition
|
||||
function toggleStyle(classList, condition, trueStyle, falseStyle) {
|
||||
if (condition) {
|
||||
classList.remove(falseStyle);
|
||||
classList.add(trueStyle);
|
||||
} else {
|
||||
classList.remove(trueStyle);
|
||||
classList.add(falseStyle);
|
||||
}
|
||||
}
|
||||
|
||||
// Sorts the rows in a table lexicographically by the content of a specific column
|
||||
function sortTable(header, columnIndex, columns) {
|
||||
var container = header.parentElement;
|
||||
var descending = header.classList.contains(sortAsc);
|
||||
container.querySelectorAll("div.table-header").forEach(
|
||||
function(header) {
|
||||
header.classList.remove(sortAsc);
|
||||
header.classList.remove(sortDesc);
|
||||
}
|
||||
)
|
||||
var cells = container.children;
|
||||
var rows = [];
|
||||
for (var i = columns; i < cells.length; i += columns) {
|
||||
rows.push(Array.prototype.slice.call(cells, i, i + columns));
|
||||
}
|
||||
var comparator = function(a, b) {
|
||||
var ka = makeComparable(a[columnIndex].textContent);
|
||||
var kb = makeComparable(b[columnIndex].textContent);
|
||||
if (ka < kb)
|
||||
return descending ? 1 : -1;
|
||||
if (ka > kb)
|
||||
return descending ? -1 : 1;
|
||||
return 0;
|
||||
};
|
||||
var sorted = rows.sort(comparator);
|
||||
var visible = 0;
|
||||
sorted.forEach(function(row) {
|
||||
if (row[0].style.display !== 'none') {
|
||||
var isEvenRow = visible++ % 2 === 0;
|
||||
}
|
||||
row.forEach(function(cell) {
|
||||
toggleStyle(cell.classList, isEvenRow, evenRowColor, oddRowColor);
|
||||
container.appendChild(cell);
|
||||
})
|
||||
});
|
||||
toggleStyle(header.classList, descending, sortDesc, sortAsc);
|
||||
}
|
||||
|
||||
// Toggles the visibility of a table category in all tables in a page
|
||||
function toggleGlobal(checkbox, selected, columns) {
|
||||
var display = checkbox.checked ? '' : 'none';
|
||||
document.querySelectorAll("div.table-tabs").forEach(function(t) {
|
||||
var id = t.parentElement.getAttribute("id");
|
||||
var selectedClass = id + "-tab" + selected;
|
||||
// if selected is empty string it selects all uncategorized entries
|
||||
var selectUncategorized = !Boolean(selected);
|
||||
var visible = 0;
|
||||
document.querySelectorAll('div.' + id)
|
||||
.forEach(function(elem) {
|
||||
if (selectUncategorized) {
|
||||
if (elem.className.indexOf(selectedClass) === -1) {
|
||||
elem.style.display = display;
|
||||
}
|
||||
} else if (elem.classList.contains(selectedClass)) {
|
||||
elem.style.display = display;
|
||||
}
|
||||
if (elem.style.display === '') {
|
||||
var isEvenRow = visible++ % (columns * 2) < columns;
|
||||
toggleStyle(elem.classList, isEvenRow, evenRowColor, oddRowColor);
|
||||
}
|
||||
});
|
||||
var displaySection = visible === 0 ? 'none' : '';
|
||||
t.parentElement.style.display = displaySection;
|
||||
document.querySelector("li#contents-" + id).style.display = displaySection;
|
||||
})
|
||||
}
|
||||
|
||||
// Shows the elements of a table belonging to a specific category
|
||||
function show(tableId, selected, columns) {
|
||||
if (tableId !== selected) {
|
||||
document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')')
|
||||
.forEach(function(elem) {
|
||||
elem.style.display = 'none';
|
||||
});
|
||||
}
|
||||
document.querySelectorAll('div.' + selected)
|
||||
.forEach(function(elem, index) {
|
||||
elem.style.display = '';
|
||||
var isEvenRow = index % (columns * 2) < columns;
|
||||
toggleStyle(elem.classList, isEvenRow, evenRowColor, oddRowColor);
|
||||
});
|
||||
updateTabs(tableId, selected);
|
||||
}
|
||||
|
||||
function updateTabs(tableId, selected) {
|
||||
document.getElementById(tableId + '.tabpanel')
|
||||
.setAttribute('aria-labelledby', selected);
|
||||
document.querySelectorAll('button[id^="' + tableId + '"]')
|
||||
.forEach(function(tab, index) {
|
||||
if (selected === tab.id || (tableId === selected && index === 0)) {
|
||||
tab.className = activeTableTab;
|
||||
tab.setAttribute('aria-selected', true);
|
||||
tab.setAttribute('tabindex',0);
|
||||
} else {
|
||||
tab.className = tableTab;
|
||||
tab.setAttribute('aria-selected', false);
|
||||
tab.setAttribute('tabindex',-1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function switchTab(e) {
|
||||
var selected = document.querySelector('[aria-selected=true]');
|
||||
if (selected) {
|
||||
if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) {
|
||||
// left or up arrow key pressed: move focus to previous tab
|
||||
selected.previousSibling.click();
|
||||
selected.previousSibling.focus();
|
||||
e.preventDefault();
|
||||
} else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) {
|
||||
// right or down arrow key pressed: move focus to next tab
|
||||
selected.nextSibling.click();
|
||||
selected.nextSibling.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var updateSearchResults = function() {};
|
||||
|
||||
function indexFilesLoaded() {
|
||||
return moduleSearchIndex
|
||||
&& packageSearchIndex
|
||||
&& typeSearchIndex
|
||||
&& memberSearchIndex
|
||||
&& tagSearchIndex;
|
||||
}
|
||||
// Copy the contents of the local snippet to the clipboard
|
||||
function copySnippet(button) {
|
||||
copyToClipboard(button.nextElementSibling.innerText);
|
||||
switchCopyLabel(button, button.firstElementChild);
|
||||
}
|
||||
function copyToClipboard(content) {
|
||||
var textarea = document.createElement("textarea");
|
||||
textarea.style.height = 0;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.value = content;
|
||||
textarea.select();
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(textarea);
|
||||
}
|
||||
function switchCopyLabel(button, span) {
|
||||
var copied = span.getAttribute("data-copied");
|
||||
button.classList.add("visible");
|
||||
var initialLabel = span.innerHTML;
|
||||
span.innerHTML = copied;
|
||||
setTimeout(function() {
|
||||
button.classList.remove("visible");
|
||||
setTimeout(function() {
|
||||
if (initialLabel !== copied) {
|
||||
span.innerHTML = initialLabel;
|
||||
}
|
||||
}, 100);
|
||||
}, 1900);
|
||||
}
|
||||
// Workaround for scroll position not being included in browser history (8249133)
|
||||
document.addEventListener("DOMContentLoaded", function(e) {
|
||||
var contentDiv = document.querySelector("div.flex-content");
|
||||
window.addEventListener("popstate", function(e) {
|
||||
if (e.state !== null) {
|
||||
contentDiv.scrollTop = e.state;
|
||||
}
|
||||
});
|
||||
window.addEventListener("hashchange", function(e) {
|
||||
history.replaceState(contentDiv.scrollTop, document.title);
|
||||
});
|
||||
var timeoutId;
|
||||
contentDiv.addEventListener("scroll", function(e) {
|
||||
if (timeoutId) {
|
||||
clearTimeout(timeoutId);
|
||||
}
|
||||
timeoutId = setTimeout(function() {
|
||||
history.replaceState(contentDiv.scrollTop, document.title);
|
||||
}, 100);
|
||||
});
|
||||
if (!location.hash) {
|
||||
history.replaceState(contentDiv.scrollTop, document.title);
|
||||
}
|
||||
});
|
||||
|
After Width: | Height: | Size: 258 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 7.6 KiB |