i was looking over my code and for the life of my i cannot get the coin to animate
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class Coin here. * * @author (your name) * @version (a version number or a date) */ public class Coin extends Actor { /** * Act - do whatever the Orang wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ GreenfootImage image1 = new GreenfootImage("Coin00.png"); GreenfootImage image2 = new GreenfootImage("Coin01.png"); GreenfootImage image3 = new GreenfootImage("Coin02.png"); GreenfootImage image4 = new GreenfootImage("Coin03.png"); GreenfootImage image5 = new GreenfootImage("Coin04.png"); GreenfootImage image6 = new GreenfootImage("Coin05.png"); public int frame = 1; public int waktu = 0; public void act() { animasi(); } public void animasi() { if (frame == 1) { if(waktu == 5) { setImage(image1); frame = 2; waktu = 0; } } else if (frame == 2) { if(waktu == 5) { setImage(image2); frame = 3; waktu = 0; } } else if (frame == 3) { if(waktu == 5) { setImage(image3); frame = 1; waktu = 0; } } else if (frame == 2) { if(waktu == 5) { setImage(image4); frame = 3; waktu = 0; } } else if (frame == 3) { if(waktu == 5) { setImage(image5); frame = 1; waktu = 0; } } else if (frame == 2) { if(waktu == 5) { setImage(image6); frame = 3; waktu = 0; } } } }