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

📄 gamedata.java

📁 一个java 3D程序的源代码
💻 JAVA
字号:
public class gameData{
	public static int[] screenTable;
	public static int[][] waveTable;
	public static int[] currentWave;
	public static int counter;
	public static texture wave;

	public static void makeData(){
		screenTable = new int[480];

		for(int i = 0; i < 480; i++)
			screenTable[i] = 640*i;

		waveTable = new int[16][16384];

		for(int i = 0; i < 16; i++){
			for(int j = 0; j < 128; j++){
				for(int k = 0; k < 128; k++)
					waveTable[i][j*128 + k] = (int)(Math.sin(Math.PI/64*k + Math.PI/8*i)*6*Math.sin(Math.PI/16*j));
			}
		}

		currentWave = waveTable[0];
		wave = new texture(currentWave, 7, 7);
	}

	public static void update(){
		currentWave = waveTable[(counter)%16];
		counter++;
	}


}

⌨️ 快捷键说明

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