「ウィンドウの作成」(2007/02/27 (火) 10:37:49) の最新版変更点
追加された行は緑色になります。
削除された行は赤色になります。
#ref(ss1.jpg)
GTGEでウィンドウを作成する方法を掲載します。以下のようなソースコードを実行することで簡単に作成できます。
----
import com.golden.gamedev.GameLoader;
import com.golden.gamedev.engine.BaseGraphics;
import com.golden.gamedev.funbox.ErrorNotificationDialog;
import com.golden.gamedev.GameEngine;
import com.golden.gamedev.GameObject;
import java.awt.Dimension;
/*
* Sample01.java
*
* Created on 2006/11/10, 13:06
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
/**
*
* @author N.Yonekawa
*/
public class Sample01 extends GameEngine {
/** Creates a new instance of Sample01 */
public Sample01() {
}
public static void main(String[] args) {
GameLoader game = new GameLoader();
game.setup(new DemoRPG(), new Dimension(640, 480), false);
//Dimensionの値を設定することでウィンドウの大きさを変更可能。
//ここのboolean値をtrueにすると、全画面表示になります。
game.start();
}
{
this.distribute = true;
//falseにするとFPSなどが表示される
}
protected void notifyError(Throwable e) {
new ErrorNotificationDialog(e, this.bsGraphics, "Sample01",
"バグ報告用メールアドレス");
}
public GameObject getGame(int i) {
return null;
}
}
#ref(ss1.jpg)
GTGEでウィンドウを作成する方法を掲載します。以下のようなソースコードを実行することで簡単に作成できます。
----
import com.golden.gamedev.GameLoader;
import com.golden.gamedev.engine.BaseGraphics;
import com.golden.gamedev.funbox.ErrorNotificationDialog;
import com.golden.gamedev.GameEngine;
import com.golden.gamedev.GameObject;
import java.awt.Dimension;
public class Sample01 extends GameEngine {
/** Creates a new instance of Sample01 */
public Sample01() {
}
public static void main(String[] args) {
GameLoader game = new GameLoader();
game.setup(new DemoRPG(), new Dimension(640, 480), false);
//Dimensionの値を設定することでウィンドウの大きさを変更可能。
//ここのboolean値をtrueにすると、全画面表示になります。
game.start();
}
{
this.distribute = true;
//falseにするとFPSなどが表示される
}
protected void notifyError(Throwable e) {
new ErrorNotificationDialog(e, this.bsGraphics, "Sample01",
"バグ報告用メールアドレス");
}
public GameObject getGame(int i) {
return null;
}
}
表示オプション
横に並べて表示:
変化行の前後のみ表示: