// Mushroom1 Class // Mushroom1.java // Imports import java.awt.*; import java.applet.Applet; import java.util.BitSet; public class Mushroom1 extends Sprite { protected static Image[] image = new Image[2]; /**Constructor*/ public Mushroom1(Component comp, Point pos) { super(comp, image, 0, 1, 20, pos, new Point(0, 0), 20, Sprite.BA_DIE); } /** Initialize the images.*/ public static void initResources(Applet app, MediaTracker tracker, int id) { for (int i = 0; i < 2; i++) { image[i] = app.getImage(app.getCodeBase(), "Res/Mush" + i + ".gif"); tracker.addImage(image[i], id); } } public BitSet update() { /** Updates the status of the bullet.*/ BitSet action = super.update(); return action; } }