TargetGame
TargetTimer.java
//-----------------------------------------------------------------------------
// Class: TargetTimer
// Author: Written by Chuck Cusack
// Date: September 2001
// Description: Controls the motion of targets on the screen.
// intended for use with AClipGun and related classes.
//-----------------------------------------------------------------------------
import aLibrary.EventTimer;
import java.awt.*;
import java.awt.event.*;
//-----------------------------------------------------------------------------
public class TargetTimer extends EventTimer {
//-----------------------------------------------------------------------------
// instance variables
//
private ATarget theTarget; // The target the timer controls
private TargetGame myGame; // the controlling director.
//-----------------------------------------------------------------------------
// constructor
//
public TargetTimer(ATarget A,TargetGame D) {
super();
theTarget=A;
myGame=D;
}
//-----------------------------------------------------------------------------
// When an event is triggered, move the target.
//
public void actionPerformed(ActionEvent e) {
theTarget.MoveTarget();
}
//-----------------------------------------------------------------------------
}
|