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

📄 gamedesign.java

📁 j2me的坦克大战 元代码 单机版和蓝牙联网版
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 240, 240, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 240, 284, 284, 284, 284, 284, 284, 282, 282, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 198, 282, 282, 282, 282, 282, 282, 282, 282, 281, 282, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 217, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 281, 281, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 282, 282, 282, 282, 282, 282, 282, 281, 281, 282, 200, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 282, 282, 282, 282, 282, 282, 282, 282, 282, 282, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }            };//GEN-END:|80-getter|1|80-midInit            // write mid-init user code here            for (int row = 0; row < 30; row++) {//GEN-BEGIN:|80-getter|2|80-postInit                for (int col = 0; col < 26; col++) {                    Water.setCell(col, row, tiles[row][col]);                }            }        }//GEN-END:|80-getter|2|80-postInit        // write post-init user code here        return Water;//GEN-BEGIN:|80-getter|3|    }//GEN-END:|80-getter|3|    public TiledLayer getTrees() throws java.io.IOException {//GEN-BEGIN:|156-getter|0|156-preInit        if (Trees == null) {//GEN-END:|156-getter|0|156-preInit            // write pre-init user code here            Trees = new TiledLayer(1, 1, getTopview_tiles(), 16, 16);//GEN-BEGIN:|156-getter|1|156-midInit            int[][] tiles = {                { 67 }            };//GEN-END:|156-getter|1|156-midInit            // write mid-init user code here            for (int row = 0; row < 1; row++) {//GEN-BEGIN:|156-getter|2|156-postInit                for (int col = 0; col < 1; col++) {                    Trees.setCell(col, row, tiles[row][col]);                }            }        }//GEN-END:|156-getter|2|156-postInit        // write post-init user code here        return Trees;//GEN-BEGIN:|156-getter|3|    }//GEN-END:|156-getter|3|    public TiledLayer getBask1() throws java.io.IOException {//GEN-BEGIN:|613-getter|0|613-preInit        if (Bask1 == null) {//GEN-END:|613-getter|0|613-preInit            // write pre-init user code here            Bask1 = new TiledLayer(11, 13, getBase12(), 24, 24);//GEN-BEGIN:|613-getter|1|613-midInit            int[][] tiles = {                { 1, 22, 1, 25, 1, 1, 21, 23, 22, 23, 23 },                { 23, 19, 1, 1, 25, 1, 22, 1, 22, 25, 1 },                { 1, 1, 6, 25, 1, 1, 22, 1, 20, 23, 23 },                { 14, 25, 25, 25, 25, 1, 22, 1, 1, 1, 1 },                { 1, 1, 25, 25, 1, 1, 22, 14, 25, 1, 1 },                { 6, 1, 1, 15, 16, 17, 22, 1, 5, 6, 1 },                { 1, 1, 1, 1, 1, 1, 6, 9, 10, 1, 1 },                { 1, 1, 25, 1, 1, 1, 1, 11, 12, 1, 1 },                { 1, 1, 1, 1, 25, 1, 14, 1, 1, 9, 10 },                { 23, 23, 18, 1, 1, 1, 25, 1, 1, 11, 12 },                { 1, 14, 22, 1, 25, 1, 1, 1, 1, 1, 1 },                { 6, 25, 22, 1, 9, 10, 1, 25, 1, 5, 1 },                { 25, 1, 22, 1, 11, 12, 25, 1, 1, 1, 1 }            };//GEN-END:|613-getter|1|613-midInit            // write mid-init user code here            for (int row = 0; row < 13; row++) {//GEN-BEGIN:|613-getter|2|613-postInit                for (int col = 0; col < 11; col++) {                    Bask1.setCell(col, row, tiles[row][col]);                }            }        }//GEN-END:|613-getter|2|613-postInit        // write post-init user code here        return Bask1;//GEN-BEGIN:|613-getter|3|    }//GEN-END:|613-getter|3|    public void updateLayerManagerForSchool1(LayerManager lm) throws java.io.IOException {//GEN-LINE:|631-updateLayerManager|0|631-preUpdate        // write pre-update user code here        getTrees1().setPosition(0, 0);//GEN-BEGIN:|631-updateLayerManager|1|631-postUpdate        getTrees1().setVisible(true);        lm.append(getTrees1());        getThings1().setPosition(0, 0);        getThings1().setVisible(true);        lm.append(getThings1());        getWater1().setPosition(70, 135);        getWater1().setVisible(true);        lm.append(getWater1());        getBask1().setPosition(0, 0);        getBask1().setVisible(true);        lm.append(getBask1());//GEN-END:|631-updateLayerManager|1|631-postUpdate        // write post-update user code here    }//GEN-BEGIN:|631-updateLayerManager|2|//GEN-END:|631-updateLayerManager|2|    public Image getWater2() throws java.io.IOException {//GEN-BEGIN:|652-getter|0|652-preInit        if (water2 == null) {//GEN-END:|652-getter|0|652-preInit            // write pre-init user code here            water2 = Image.createImage("/tank/water2.png");//GEN-BEGIN:|652-getter|1|652-postInit        }//GEN-END:|652-getter|1|652-postInit        // write post-init user code here        return this.water2;//GEN-BEGIN:|652-getter|2|    }//GEN-END:|652-getter|2|    public TiledLayer getWater1() throws java.io.IOException {//GEN-BEGIN:|653-getter|0|653-preInit        if (Water1 == null) {//GEN-END:|653-getter|0|653-preInit            // write pre-init user code here            Water1 = new TiledLayer(1, 1, getWater2(), 45, 33);//GEN-BEGIN:|653-getter|1|653-midInit            int[][] tiles = {                { 1 }            };//GEN-END:|653-getter|1|653-midInit            // write mid-init user code here            for (int row = 0; row < 1; row++) {//GEN-BEGIN:|653-getter|2|653-postInit                for (int col = 0; col < 1; col++) {                    Water1.setCell(col, row, tiles[row][col]);                }            }        }//GEN-END:|653-getter|2|653-postInit        // write post-init user code here        return Water1;//GEN-BEGIN:|653-getter|3|    }//GEN-END:|653-getter|3|    public Image getPlatform_tiles() throws java.io.IOException {//GEN-BEGIN:|684-getter|0|684-preInit        if (platform_tiles == null) {//GEN-END:|684-getter|0|684-preInit            // write pre-init user code here            platform_tiles = Image.createImage("/tank/platform_tiles.png");//GEN-BEGIN:|684-getter|1|684-postInit        }//GEN-END:|684-getter|1|684-postInit        // write post-init user code here        return this.platform_tiles;//GEN-BEGIN:|684-getter|2|    }//GEN-END:|684-getter|2|    public TiledLayer getTrees1() throws java.io.IOException {//GEN-BEGIN:|685-getter|0|685-preInit        if (Trees1 == null) {//GEN-END:|685-getter|0|685-preInit            // write pre-init user code here            Trees1 = new TiledLayer(14, 13, getPlatform_tiles(), 16, 16);//GEN-BEGIN:|685-getter|1|685-midInit            int[][] tiles = {                { 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0 },                { 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26 },                { 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 23, 23, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0 }            };//GEN-END:|685-getter|1|685-midInit            // write mid-init user code here            for (int row = 0; row < 13; row++) {//GEN-BEGIN:|685-getter|2|685-postInit                for (int col = 0; col < 14; col++) {                    Trees1.setCell(col, row, tiles[row][col]);                }            }        }//GEN-END:|685-getter|2|685-postInit        // write post-init user code here        return Trees1;//GEN-BEGIN:|685-getter|3|    }//GEN-END:|685-getter|3|    public TiledLayer getThings1() throws java.io.IOException {//GEN-BEGIN:|686-getter|0|686-preInit        if (Things1 == null) {//GEN-END:|686-getter|0|686-preInit            // write pre-init user code here            Things1 = new TiledLayer(15, 18, getTopview_tiles(), 16, 16);//GEN-BEGIN:|686-getter|1|686-midInit            int[][] tiles = {                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70 },                { 0, 0, 0, 0, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 70, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 67, 0, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 67 },                { 0, 0, 0, 0, 0, 0, 0, 0, 69, 0, 69, 0, 0, 0, 0 },                { 0, 0, 69, 69, 69, 0, 0, 0, 0, 0, 0, 69, 0, 0, 70 },                { 0, 70, 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 69, 0, 0, 0, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 0, 0, 0, 67, 67, 0, 0, 0, 0, 0 },                { 0, 0, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0 }            };//GEN-END:|686-getter|1|686-midInit            // write mid-init user code here            for (int row = 0; row < 18; row++) {//GEN-BEGIN:|686-getter|2|686-postInit                for (int col = 0; col < 15; col++) {                    Things1.setCell(col, row, tiles[row][col]);                }            }        }//GEN-END:|686-getter|2|686-postInit        // write post-init user code here        return Things1;//GEN-BEGIN:|686-getter|3|    }//GEN-END:|686-getter|3|}

⌨️ 快捷键说明

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