Any and all help with this project is appreciated. I'm stuck right now in that the code for when he is walking left works perfectly, but when he is walking right it does not switch to imageMR (Even though it switches to imageR). Please tell me why it works for left but not right. Thanks :)
private void animateMario() { if (mLeft == true && Greenfoot.isKeyDown("a")) { if (getImage() == imageL && imageDelayCount >= imageTime) { setImage(imageML); imageDelayCount = 0; } if (getImage() == imageML && imageDelayCount >= imageTime) { setImage(imageL); imageDelayCount = 0; } if (getImage() == imageR) { setImage(imageL); imageDelayCount = 0; } if (getImage() == imageMR) { setImage(imageL); imageDelayCount = 0; } } if (mLeft == true && Greenfoot.isKeyDown("a") == false) { setImage(imageL); } if (mLeft == false && Greenfoot.isKeyDown("d")) { if (getImage() == imageR && imageDelayCount >= imageTime) { setImage(imageMR); imageDelayCount = 0; } if (getImage() == imageMR && imageDelayCount >= imageTime) { setImage(imageR); imageDelayCount = 0; } if (getImage() == imageL) { setImage(imageR); imageDelayCount = 0; } if (getImage() == imageML) { setImage(imageR); imageDelayCount = 0; } } if (mLeft == false && !Greenfoot.isKeyDown("d") == false) { setImage(imageR); } }