i want to display balloon at the end of level in my game after successful completion of level.
How can i do so?
Balloons b = new Balloons(); addObject(b, 100, 100); // or possibly 'getWorld().addObject(b,100,100)'
/**
* 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;
"GifImage gifImage = new GifImage("wingif.gif");