本文整理汇总了Java中com.almasb.fxgl.input.InputMapping类的典型用法代码示例。如果您正苦于以下问题:Java InputMapping类的具体用法?Java InputMapping怎么用?Java InputMapping使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InputMapping类属于com.almasb.fxgl.input包,在下文中一共展示了InputMapping类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: openInitialWindows
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
public void openInitialWindows() {
if (OS.contains("mac")) {
// SwingUtilities needed below for MacOSX
SwingUtilities.invokeLater(() -> {
desktop.openInitialWindows();
});
} else {
desktop.openInitialWindows();
}
quote = new QuotationPopup(this);
// popAQuote();
isMainSceneDoneLoading = true;
if (isFXGL) {
Input input = FXGL.getInput();
input.addInputMapping(new InputMapping("Open", KeyCode.O));
}
}
示例2: initInput
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
@Override
protected void initInput() {
Input input = getInput();
input.addInputMapping(new InputMapping("Up", KeyCode.W));
input.addInputMapping(new InputMapping("Down", KeyCode.S));
}
示例3: initInput
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
@Override
protected void initInput() {
// 1. get input service
Input input = getInput();
// 2. add input mappings (action name -> trigger name)
input.addInputMapping(new InputMapping("Print Line", KeyCode.F));
}
示例4: initInput
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
@Override
protected void initInput() {
Input input = getInput();
input.addInputMapping(new InputMapping("Move Left", KeyCode.A));
input.addInputMapping(new InputMapping("Move Right", KeyCode.D));
input.addInputMapping(new InputMapping("Move Up", KeyCode.W));
input.addInputMapping(new InputMapping("Move Down", KeyCode.S));
input.addInputMapping(new InputMapping("Shoot", MouseButton.PRIMARY));
}
示例5: initInput
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
@Override
protected void initInput() {
Input input = getInput();
input.addInputMapping(new InputMapping("Open", KeyCode.O));
}
示例6: initInput
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
@Override
protected void initInput() {
getInput().addInputMapping(new InputMapping("Show Notification", KeyCode.F));
}
示例7: initInput
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
@Override
protected void initInput() {
Input input = getInput();
input.addInputMapping(new InputMapping("Shoot", KeyCode.F));
}
示例8: initInput
import com.almasb.fxgl.input.InputMapping; //导入依赖的package包/类
@Override
protected void initInput() {
Input input = getInput();
input.addInputMapping(new InputMapping("Open", KeyCode.O));
input.addInputMapping(new InputMapping("Test", KeyCode.F));
}