- Lebensanzeige

- walk Animation fertig
This commit is contained in:
Max
2026-09-15 21:04:11 +02:00
parent 60d21d5f68
commit 067d36033d
45 changed files with 110 additions and 22 deletions
+35
View File
@@ -0,0 +1,35 @@
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class LebensanzeigeP1 here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Lebensanzeige extends Actor
{
/**
* Act - do whatever the LebensanzeigeP1 wants to do. This method is called whenever
* the 'Act' or 'Run' button gets pressed in the environment.
*/
Lebensanzeige(){
setImage("green.png");
GreenfootImage image = getImage();
image.scale(200,40);
setImage(image);
}
public void act()
{
}
public void leben(double pLeben){
if(pLeben != 0){
setImage("green.png");
GreenfootImage image = getImage();
image.scale((int)(200 * (pLeben/100)),40);
setImage(image);
}
}
}