java.lang.Object java.lang.Thread GameController
public class GameController
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
static int |
MAX_ANGLE
|
static int |
MAX_VELOCITY
|
static int |
MIN_ANGLE
|
static int |
MIN_VELOCITY
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
GameController(Game game,
int ticksPerSecond)
|
Method Summary | |
---|---|
int |
getAngle()
|
Game |
getGame()
|
int |
getVelocity()
|
boolean |
isPaused()
|
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
run()
|
void |
setViewer(GameGUI gui)
|
void |
windowActivated(java.awt.event.WindowEvent arg0)
|
void |
windowClosed(java.awt.event.WindowEvent arg0)
|
void |
windowClosing(java.awt.event.WindowEvent arg0)
|
void |
windowDeactivated(java.awt.event.WindowEvent arg0)
|
void |
windowDeiconified(java.awt.event.WindowEvent arg0)
|
void |
windowIconified(java.awt.event.WindowEvent arg0)
|
void |
windowOpened(java.awt.event.WindowEvent arg0)
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MIN_VELOCITY
public static final int MAX_VELOCITY
public static final int MIN_ANGLE
public static final int MAX_ANGLE
Constructor Detail |
---|
public GameController(Game game, int ticksPerSecond)
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public Game getGame()
public boolean isPaused()
public int getAngle()
public int getVelocity()
public void setViewer(GameGUI gui)
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void windowActivated(java.awt.event.WindowEvent arg0)
windowActivated
in interface java.awt.event.WindowListener
public void windowClosed(java.awt.event.WindowEvent arg0)
windowClosed
in interface java.awt.event.WindowListener
public void windowClosing(java.awt.event.WindowEvent arg0)
windowClosing
in interface java.awt.event.WindowListener
public void windowDeactivated(java.awt.event.WindowEvent arg0)
windowDeactivated
in interface java.awt.event.WindowListener
public void windowDeiconified(java.awt.event.WindowEvent arg0)
windowDeiconified
in interface java.awt.event.WindowListener
public void windowIconified(java.awt.event.WindowEvent arg0)
windowIconified
in interface java.awt.event.WindowListener
public void windowOpened(java.awt.event.WindowEvent arg0)
windowOpened
in interface java.awt.event.WindowListener