📄 usegamekeys.java
字号:
/* * UseGameKeys.java */package org.java3dgamesdk.samples.II;import org.java3dgamesdk.core.*;import org.java3dgamesdk.core.util.*;/** * This sample application demonstrates how to use the game keys. * This class has also the GameFrame as super class. * * @author Norbert Nopper */public class UseGameKeys extends GameFrame { public static void main(String[] argv) { // create the object UseGameKeys useGameKeys = new UseGameKeys(); // create the object and pass the game frame to it ... RenderSelection renderSelection = new RenderSelection(useGameKeys); // ... rest is done by the dialog renderSelection.show(); } /** * Not used here. */ protected void initGame() { } /** * This application uses the game keys to exit the engine by pressing throws ESC key. * *@param currentTime the current game time in miliseconds, starting with 0 */ protected void updateGame(long currentTime) { if(gameKeys[27]) exit(); } /** * Whenever a scene has to be rendered, the surface has to be cleaned first. */ protected void renderGame() { gc3D.clear(); } /** * Not used here. */ protected void exitGame() { } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -