com.golden.gamedev.engine.input
Class AWTInput
java.lang.Object
|
+--com.golden.gamedev.engine.input.AWTInput
- All Implemented Interfaces:
- BaseInput
- public class AWTInput
- extends Object
- implements BaseInput
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AWTInput
public AWTInput(Component comp)
createInputListener
protected AWTInput.InputListener createInputListener()
cleanup
public void cleanup()
- Specified by:
cleanup
in interface BaseInput
refresh
public void refresh()
- Specified by:
refresh
in interface BaseInput
update
public void update()
- Specified by:
update
in interface BaseInput
mouseMove
public void mouseMove(int x,
int y)
- Description copied from interface:
BaseInput
- Move the mouse to
x
, y
screen coordinate.
- Specified by:
mouseMove
in interface BaseInput
- Parameters:
x
- the x
-coordinate of the new mouse locationy
- the y
-coordinate of the new mouse location
isMouseExists
public boolean isMouseExists()
- Specified by:
isMouseExists
in interface BaseInput
getMouseX
public int getMouseX()
- Specified by:
getMouseX
in interface BaseInput
getMouseY
public int getMouseY()
- Specified by:
getMouseY
in interface BaseInput
getMouseDX
public int getMouseDX()
- Specified by:
getMouseDX
in interface BaseInput
getMouseDY
public int getMouseDY()
- Specified by:
getMouseDY
in interface BaseInput
getMouseReleased
public int getMouseReleased()
- Specified by:
getMouseReleased
in interface BaseInput
isMouseReleased
public boolean isMouseReleased(int button)
- Specified by:
isMouseReleased
in interface BaseInput
getMousePressed
public int getMousePressed()
- Specified by:
getMousePressed
in interface BaseInput
isMousePressed
public boolean isMousePressed(int button)
- Specified by:
isMousePressed
in interface BaseInput
getMouseDown
public boolean[] getMouseDown()
- Specified by:
getMouseDown
in interface BaseInput
isMouseDown
public boolean isMouseDown(int button)
- Specified by:
isMouseDown
in interface BaseInput
getKeyReleased
public int getKeyReleased()
- Specified by:
getKeyReleased
in interface BaseInput
isKeyReleased
public boolean isKeyReleased(int keyCode)
- Specified by:
isKeyReleased
in interface BaseInput
getKeyPressed
public int getKeyPressed()
- Specified by:
getKeyPressed
in interface BaseInput
isKeyPressed
public boolean isKeyPressed(int keyCode)
- Specified by:
isKeyPressed
in interface BaseInput
getKeyDown
public boolean[] getKeyDown()
- Specified by:
getKeyDown
in interface BaseInput
isKeyDown
public boolean isKeyDown(int keyCode)
- Specified by:
isKeyDown
in interface BaseInput
getComponent
public Component getComponent()
- Returns the awt component used by this input.