Lud*_*vik 10
在LibGDX中查看有关scene2d的 Wiki页面.特别是关于输入处理的部分.
基本上你必须在Actor中覆盖这些方法中的一个或多个:
public boolean touchDown (float x, float y, int pointer) {
return false;
}
public void touchUp (float x, float y, int pointer) {
}
public void touchDragged (float x, float y, int pointer) {
}
public boolean touchMoved (float x, float y) {
return false;
}
public boolean scrolled (int amount) {
return false;
}
public boolean keyDown (int keycode) {
return false;
}
public boolean keyUp (int keycode) {
return false;
}
public boolean keyTyped (char character) {
return false;
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
23068 次 |
最近记录: |