本文整理了Java中com.badlogic.gdx.scenes.scene2d.Stage.keyDown()
方法的一些代码示例,展示了Stage.keyDown()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Stage.keyDown()
方法的具体详情如下:
包路径:com.badlogic.gdx.scenes.scene2d.Stage
类名称:Stage
方法名:keyDown
[英]Applies a key down event to the actor that has Stage#setKeyboardFocus(Actor), if any, and returns true if the event was Event#handle().
[中]对具有Stage#setKeyboardFocus(actor)(如果有)的参与者应用按键关闭事件,如果事件为event#handle(),则返回true。
代码示例来源:origin: com.lwgame.gdx/lwgame-core
@Override
public boolean keyDown(int keycode) {
return stage.keyDown(keycode) || !isTransparent();
}
代码示例来源:origin: com.lwgame.gdx/core
@Override
public boolean keyDown(int keycode) {
return stage.keyDown(keycode) || !isTransparent();
}
代码示例来源:origin: dingjibang/GDX-RPG
/** Called when a key was pressed
*
* @param keycode one of the constants in {@link Input.Keys}
* @return whether the input was processed */
public boolean keyDown (int keycode){
if($.allMatch(processors(), p -> p.keyDown(keycode)) && onInput()){
stage.keyDown(keycode);
return bubble;
}
return false;
};
内容来源于网络,如有侵权,请联系作者删除!