| Modifier and Type | Field and Description |
|---|---|
protected Circle |
paddleLeft |
protected Circle |
paddleRight |
currentFrame| Constructor and Description |
|---|
Pong(int width,
int height) |
| Modifier and Type | Method and Description |
|---|---|
long |
countFrames()
Return the number of frames in the whole video.
|
MBFImage |
getCurrentFrame()
Get the current frame
|
double |
getFPS()
Get the frame rate
|
int |
getHeight()
Get the height of the video frame.
|
MBFImage |
getNextFrame()
Get the next frame.
|
long |
getTimeStamp()
Get the timestamp of the current frame in milliseconds
|
int |
getWidth()
Get the width of the video frame
|
boolean |
hasNextFrame()
Returns whether this video has another frame to provide.
|
void |
leftPaddle(float paddleY) |
void |
leftPaddleDown() |
void |
leftPaddleUp() |
float |
leftPaddleY() |
static void |
main(String[] args) |
void |
reset()
Reset the video - putting the frame counter back to the start.
|
protected void |
rightPaddle(float paddleY) |
protected void |
rightPaddleDown() |
protected void |
rightPaddleUp() |
float |
rightPaddleY() |
close, getCurrentFrameIndex, iterator, seek, setCurrentFrameIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected Circle paddleLeft
protected Circle paddleRight
public Pong(int width, int height)
public MBFImage getNextFrame()
VideogetNextFrame in class Video<MBFImage>public MBFImage getCurrentFrame()
VideogetCurrentFrame in class Video<MBFImage>public int getWidth()
Videopublic int getHeight()
Videopublic long getTimeStamp()
VideogetTimeStamp in class Video<MBFImage>public boolean hasNextFrame()
VideohasNextFrame in class Video<MBFImage>public long countFrames()
VideocountFrames in class Video<MBFImage>public void reset()
Videopublic void leftPaddle(float paddleY)
protected void rightPaddle(float paddleY)
public void leftPaddleUp()
public void leftPaddleDown()
protected void rightPaddleUp()
protected void rightPaddleDown()
public float leftPaddleY()
public float rightPaddleY()