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

📄 boxesgame2.java

📁 游戏基础
💻 JAVA
字号:
package net.java.gamebase.sample.boxes.v2;

import java.util.Random;

import net.java.gamebase.core.GameBaseUI;

/**
 * ramdomize the color of the box generating the limit of the color 
 * by the size of list of colors
 * 
 * @author hlima
 *
 */
public class BoxesGame2 extends GameBaseUI {

	public static void main(String[] args) {
		BoxesGame2 g = new BoxesGame2(640, 480);
		g.show();
	}

	public BoxesGame2(int width, int height) {
		super(width, height);
		Random r = new Random();
		int color = r.nextInt(Box.colors.length-1);
		add( new Box(color,10,10));
	}

}

⌨️ 快捷键说明

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