⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 teststandardgame.java.svn-base

📁 一个JAVA程序员的游戏
💻 SVN-BASE
字号:
/*
 * TestStandardGame.java
 *
 * Created on 20. Januar 2007, 17:03
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package kanjitori;

import com.jme.bounding.*;
import com.jme.math.*;
import com.jme.scene.shape.Box;
import com.jme.scene.shape.Cylinder;
import com.jmex.editors.swing.settings.*;
import com.jmex.game.*;
import com.jmex.game.state.*;

/**
 * TestStandardGame is meant to be an example replacement of
 * jmetest.base.TestSimpleGame using the StandardGame implementation
 * instead of SimpleGame.
 *
 * @author Matthew D. Hicks
 */
public class TestStandardGame {
    public static void main(String[] args) throws Exception {
        StandardGame game = new StandardGame("A Simple Test");
        GameSettingsPanel.prompt(game.getSettings());
        game.start();

        DebugGameState state = new DebugGameState();
        Box box = new Box("my box", new Vector3f(0, 0, 0), 2, 2, 2);
        box.setModelBound(new BoundingSphere());
        box.updateModelBound();
        box.updateRenderState();
        state.getRootNode().attachChild(box);
        GameStateManager.getInstance().attachChild(state);
        state.setActive(true);

        
        DebugGameState state1 = new DebugGameState();
        Cylinder cyl = new Cylinder("my cyl", 5, 5, 5.0f, 1.0f);
        cyl.setModelBound(new BoundingSphere());
        cyl.updateModelBound();
        cyl.updateRenderState();
        state1.getRootNode().attachChild(cyl);
        GameStateManager.getInstance().attachChild(state1);
        
        state1.setActive(true);
        
        while(true) {
            Thread.sleep(1000);
            state.setActive(false);
            Thread.sleep(1000);
            state.setActive(true);
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -