// Gun Class // Gun.java // Imports import java.awt.*; import java.applet.Applet; import java.util.BitSet; public class Gun extends Sprite { public static Image[] image; /**Constructor*/ public Gun(Component comp, int i, Point pos) { super(comp, // Component image, // Image to use i, // Current Frame 0, // Frame Increment 0, // Frame Delay pos, // Current Location new Point(0, 0), // Velocity 5, // Z-Order Sprite.BA_STOP); // Bounds Action // Direction } public static void initResources(Applet app, MediaTracker tracker, int id) { image = new Image[1]; for (int i = 0; i < 1; i++) { image[i] = app.getImage(app.getCodeBase(), "Res/Gun" + i + ".gif"); tracker.addImage(image[i], id); } } public BitSet update() { return (new BitSet()); } }