// WARNING: This file is auto-generated and any changes to it will be overwritten import java.util.*; import greenfoot.*; /** * */ public class Gegner extends Actor { /** * Act - do whatever the Gegner wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { } /** * vorprogrammiert */ public void selbststaendigBewegen() { this.move(this.geschwindigkeit); if (this.isAtEdge()) { this.geschwindigkeit = - this.geschwindigkeit; if (this.getY() < this.getWorld().getHeight() - (this.getWorld().getHeight() / 3)) { this.setLocation(this.getX(), this.getY() + 15); } } this.gegnerbeschriftung.setLocation(this.getX(), this.getY()); } /** * vorprogrammiert */ public Gegnerbeschriftung getGegnerbeschriftung() { return this.gegnerbeschriftung; } /** * */ public void setGegnerbeschriftung(Gegnerbeschriftung gegnerbeschriftung) { this.gegnerbeschriftung = gegnerbeschriftung; } }