All Packages Class Hierarchy This Package Previous Next Index
Class pinball.part.Flipper
java.lang.Object
|
+----pinball.part.Flipper
- public class Flipper
- extends Object
- implements Serializable
The flippers in the pinball machine.
-
down
- Is the flipper down?
-
flip
- Used to control the flipper.
-
LEFT
- Left flipper.
-
RIGHT
- Right flipper.
-
serialVersionUID
- Used to keep the same serialized version.
-
timeStamp
- The time since last flipped.
-
which
- Which type of flipper it is, left or right.
-
x
- X location of the flipper.
-
y
- Y location of the flipper.
-
yOffset
- Offset of flipper from top of frame.
-
Flipper(DataIO, int)
-
Set up the flipper to the left or right.
-
down()
- Is the flipper down.
-
flip()
-
Do a flip, but if already up do not flip.
-
readObject(ObjectInputStream)
-
-
reset()
- Reset the flipper.
-
timeStamp()
-
Get the time stamp for the flipper.
-
up()
- Is the flipper up.
-
writeObject(ObjectOutputStream)
- Write the flipper to disk.
-
x()
- Get the x location of the flipper.
-
x(int)
- Set the y location of the flipper.
-
y()
- Get the y location of the flipper.
-
y(int)
- Set the y location of the flipper.
-
yOffset()
-
Get the Y offset of the flipper.
-
yOffset(int)
- Set the Y offset of the flipper.
serialVersionUID
static final long serialVersionUID
- Used to keep the same serialized version.
flip
private transient DataIO flip
- Used to control the flipper.
which
private BitSet which
- Which type of flipper it is, left or right.
LEFT
public static int LEFT
- Left flipper.
RIGHT
public static int RIGHT
- Right flipper.
x
private int x
- X location of the flipper.
y
private int y
- Y location of the flipper.
yOffset
private int yOffset
- Offset of flipper from top of frame.
down
private boolean down
- Is the flipper down?
timeStamp
private FlipperTimeStamp timeStamp
- The time since last flipped.
Flipper
public Flipper(DataIO flip,
int whichFlipper)
- Set up the flipper to the left or right.
- Parameters:
- which - Which flipper this is. 0 = left, right = 1.
x
public void x(int x)
- Set the y location of the flipper.
- Parameters:
- x - The flipper's x location.
y
public void y(int y)
- Set the y location of the flipper.
- Parameters:
- y - The flipper's y location.
x
public int x()
- Get the x location of the flipper.
- Returns:
- x location of flipper.
y
public int y()
- Get the y location of the flipper.
- Returns:
- y location of flipper.
yOffset
public void yOffset(int y)
- Set the Y offset of the flipper.
- Parameters:
- y - y offset of flipper.
yOffset
public int yOffset()
- Get the Y offset of the flipper.
- Returns:
- y offset of flipper.
flip
public void flip()
- Do a flip, but if already up do not flip.
reset
public void reset()
- Reset the flipper.
timeStamp
public FlipperTimeStamp timeStamp()
- Get the time stamp for the flipper.
- Returns:
- timeStamp
up
public boolean up()
- Is the flipper up.
- Returns:
- flipper's up status.
down
public boolean down()
- Is the flipper down.
- Returns:
- flipper's down status.
writeObject
private void writeObject(ObjectOutputStream s) throws IOException
- Write the flipper to disk.
- Parameters:
- s - stream to write to.
readObject
private void readObject(ObjectInputStream s) throws IOException
All Packages Class Hierarchy This Package Previous Next Index