|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.petterroea.starterkit.Screen
public class Screen
Inspired(But not copied from) by Notch's Ludum dare game system. Game states are sorted into screens.
For example, one screen can be the main menu, one the options, and one the game itself.
| Constructor Summary | |
|---|---|
Screen()
|
|
| Method Summary | |
|---|---|
void |
focusGained(java.awt.event.FocusEvent e)
Called when the game window gets focus. |
void |
focusLost(java.awt.event.FocusEvent e)
Called when the game window looses focus. |
void |
keyTyped(java.awt.event.KeyEvent arg0)
Called when a key is typed. |
void |
mouseClicked(java.awt.event.MouseEvent arg0)
Called when the mouse is clicked. |
void |
mouseDragged(java.awt.event.MouseEvent arg0)
Called when the mouse is dragged(Moved while a mousebutton is pressed). |
void |
mouseEntered(java.awt.event.MouseEvent arg0)
Called when the mouse enters the game window. |
void |
mouseExited(java.awt.event.MouseEvent arg0)
Called when the mouse exits the game window. |
void |
mouseMoved(java.awt.event.MouseEvent arg0)
Called when the mouse is moved without a mouse button being pressed down. |
void |
mousePressed(java.awt.event.MouseEvent arg0)
Called when a mouse button is pressed. |
void |
mouseReleased(java.awt.event.MouseEvent arg0)
Called when a mouse button is released. |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent arg0)
Called when the mousewheel is scrolled/moved. |
void |
tick(int delta,
java.awt.Graphics g)
Ticks/Updates the screen, is called every time the game updates. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Screen()
| Method Detail |
|---|
public void tick(int delta,
java.awt.Graphics g)
delta - Time since last update in millisecondsg - Graphics objectpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent arg0)
arg0 - The event objectpublic void mouseDragged(java.awt.event.MouseEvent arg0)
arg0 - The mouse event objectpublic void mouseMoved(java.awt.event.MouseEvent arg0)
arg0 - The mouse event objectpublic void mouseClicked(java.awt.event.MouseEvent arg0)
arg0 - The mouse event objectpublic void mouseEntered(java.awt.event.MouseEvent arg0)
arg0 - The mouse eventpublic void mouseExited(java.awt.event.MouseEvent arg0)
arg0 - The mouse eventpublic void mousePressed(java.awt.event.MouseEvent arg0)
arg0 - The mouse eventpublic void mouseReleased(java.awt.event.MouseEvent arg0)
arg0 - The mouse eventpublic void keyTyped(java.awt.event.KeyEvent arg0)
arg0 - The key eventpublic void focusGained(java.awt.event.FocusEvent e)
e - The focus eventpublic void focusLost(java.awt.event.FocusEvent e)
e - The focus event
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||