group1.control
Class JeffController

java.lang.Object
  extended by group1.control.Controller
      extended by group1.control.JeffController
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener

public class JeffController
extends Controller

The controller for Jeff, the main character. Accepts keyboard inputs and sets values in the local Jeff object appropriately.


Constructor Summary
JeffController(Jeff j)
          Constructor.
 
Method Summary
 void keyPressed(java.awt.event.KeyEvent e)
          keyPressed method to implement KeyListener.
 void keyReleased(java.awt.event.KeyEvent e)
          keyReleased method to implement KeyListener.
 
Methods inherited from class group1.control.Controller
isActionPressed, isDownPressed, isJumpPressed, isLeftPressed, isRightPressed, isSelectPressed, isStartPressed, isUpPressed, keyTyped, wasActionHit, wasDownHit, wasJumpHit, wasLeftHit, wasRightHit, wasSelectHit, wasStartHit, wasUpHit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JeffController

public JeffController(Jeff j)
Constructor.

Parameters:
j - A reference to the Jeff object in the game.
Method Detail

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
keyPressed method to implement KeyListener. Called whenever a key is pressed. Iteratively checks for keys being pressed (or just hit), and responds.

Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class Controller
Parameters:
e - The KeyEvent caught.

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
keyReleased method to implement KeyListener. Called whenever a key is released. Iteratively checks for keys not pressed, and responds.

Specified by:
keyReleased in interface java.awt.event.KeyListener
Overrides:
keyReleased in class Controller
Parameters:
e - The KeyEvent caught.