I wanted to change the image of an object when the player scored more than 10 points. All classes are subclasses of the Player class. I wrote the following method in the player class and called it in the child classes and passed the correct image name as the transfer parameter:
Als ich nun ds Spiel startete und 10 Punkte erreicht haben sich die Images der Unterklassen nicht verändert, nur das Image des Players, also der Oberklasse. Does anyone can help me?
public void changeImage(String name) { if(Score > 10) { setImage(name); } }