TargetGame
ABullet.java
//-----------------------------------------------------------------------------
// Class: ABullet
// Author: Written by Chuck Cusack
// Date: September 2001
// Description: the ABullet class represents a bullet that can be placed in an
// AClip. This class does not contain any graphics, and it is intended
// that the user extend this class to diplay the bullet as they desire.
//
//-----------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
import aLibrary.*;
//-----------------------------------------------------------------------------
public abstract class ABullet extends AView {
//-----------------------------------------------------------------------------
// The constructor.
// postcondition: Draws and empty AView of the specified size.
// Will only draw something if subclass is defined and implements
// the methods listed below.
//
public ABullet(int x,int y,int width,int height) {
super(x,y,width,height);
drawBullet();
}
//-----------------------------------------------------------------------------
// Implement the following functions in the subclass so they display
// and move the bullet as you wish.
//
protected void drawBullet() {}
protected void drawBulletFiring(TargetGame D) {}
//-----------------------------------------------------------------------------
}
|