Score und neue Platforms sowie Player Figur

This commit is contained in:
2026-09-16 16:22:07 +02:00
parent da0a97adfe
commit b095aeb05f
16 changed files with 191 additions and 38 deletions
+1 -10
View File
@@ -8,22 +8,13 @@ import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
*/
public class Score extends Actor
{
int timer;
/**
* 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()
{
timer++;
draw_score();
}
public void draw_score(){
setImage(new GreenfootImage("Score:" + calculate_score(), 24, Color.WHITE, Color.BLACK));
}
public int calculate_score(){
return timer/60;
}
}