0
Hello, I’m trying to animate the Sprite when it receives damage (changing to a white Sprite), but I’m not getting it, according to the eclipse itself says the error is in ''{'' but in my view they are all correct, and I can not find error in my code.
if(!isDamaged) {
else if(dir==left_dir){
g.drawImage(leftPlayer[index], this.getX()-Camera.x,this.getY()-Camera.y,null);
} else {
g.drawImage(playerDamageLeft, this.getX() -Camera.x,this.getY()- Camera.y,null);
}
}
if(!isDamaged) {
if(dir==up_dir) {
g.drawImage(upPlayer[index], this.getX()-Camera.x,this.getY()-Camera.y,null);
} else {
g.drawImage(playerDamageUp, this.getX() -Camera.x,this.getY()- Camera.y,null);
}
}
if(!isDamaged) {
else if(dir==down_dir){
g.drawImage(downPlayer[index], this.getX()-Camera.x,this.getY()-Camera.y,null);
} else {
g.drawImage(playerDamageDown, this.getX()-Camera.x,this.getY()- Camera.y,null);
}
}