i want to display balloon at the end of level in my game after successful completion of level.
How can i do so?


1 2 | Balloons b = new Balloons(); addObject(b, 100 , 100 ); // or possibly 'getWorld().addObject(b,100,100)' |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | /** * This class can be used to read animated gif image files and extract the individual * images of the animation sequence. * <p> * To use GifImage in an actor, declare it as an instance variable: * * <pre> * {@code * GifImage gifImage = new GifImage("mygif.gif"); * } * </pre> * * Then, in the act() method of your actor, set the actor's image to the current image * from your GifImage instance: * * <pre> * {@code * setImage(gifImage.getCurrentImage()); * } * </pre> * * @author Michael Berry * @author Neil Brown */ public class GifImage { /** The images used in the animation. */ private GreenfootImage[] images; /** The delay between each frame. */ private int [] delay; /** The index of the current frame in the GIF file. */ private int currentIndex; /** The time passed since the last frame in ms. */ private long time; /** The GIF file that contains the animation. */ private String file; /** Whether the animation is paused or not. */ private boolean pause; |
1 | "GifImage gifImage = new GifImage(" wingif.gif"); |