|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--uwcse.graphics.GWindowEventAdapter
|
+--uwcse.sim.PacManController
This class demos the use of the GWindow Event system. It is a subclass of the dummy EventAdapter that just turns keypresses into changes of direction for the Man being controlled.
| Field Summary | |
(package private) Man |
theMan
|
| Constructor Summary | |
PacManController(Man m)
Create a new controller for the given man. |
|
| Method Summary | |
void |
keyPressed(uwcse.graphics.GWindowEvent e)
The interesting keys are j (west); k (south); i (north); and l (east). |
| Methods inherited from class uwcse.graphics.GWindowEventAdapter |
keyReleased, mousePressed, mouseReleased, timerExpired |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
Man theMan
| Constructor Detail |
public PacManController(Man m)
| Method Detail |
public void keyPressed(uwcse.graphics.GWindowEvent e)
keyPressed in class uwcse.graphics.GWindowEventAdapter
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||