I finished chapter 2 in creative greenfoot book, so twink doesn´t work. method in Avatar class: addedToWorld isn´t called. Where should I put that method? I want to see skull eyes. It is written corectly, but it is never called - it doesn´t work.
When I catch a clover, it not gives me health. Skull is the same, not changing.
protected void addedToWorld(World w){
leftEye = new Eye();
rightEye = new Eye();
w.addObject(leftEye, getX()-10, getY()-8);
w.addObject(rightEye, getX()+10,getY()-8);
}
public void addHealth(){
if(health < 3){
health++;
if(--nextImage == 0){
setImage("images/skull.png");
}else{
setImage("images/skull" + nextImage + ".png");
}
}
}
