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

📄 background.java

📁 fishgame手机游戏 运用工具netbean可以运行起来
💻 JAVA
字号:
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package cn.zucc.mmf.harpoon;import javax.microedition.lcdui.Image;import javax.microedition.lcdui.game.Sprite;import javax.microedition.lcdui.game.TiledLayer;/** * * @author Administrator */class Background extends TiledLayer{    private static final int IMAGE_COLUMNS = 8;    private static final int IMAGE_ROWS = 2;    private static Image m_image;    private static final int MAP_COLUMNS = 8;    private static final int MAP_ROWS = 7;    private static final int m_map[][] = {		{  1,  2, 3,  4,  5,  6,  7,  8  },		{  9,  10,11, 12, 13, 14, 15, 16 },		{  17, 18,19, 20, 21, 22, 23, 24 },		{  25, 26,27, 28, 29, 30, 31, 32 },		{  33, 34,35, 36, 37, 38, 39, 40 },		{  41, 42, 43,44, 45, 46, 47, 48 },		{  49, 50, 51,52, 53, 54, 55, 56 },			};  public Background(int screenwidth,int screenheight,Image image){      super(MAP_COLUMNS,MAP_ROWS,image,image.getWidth()/8,image.getHeight()/7);       for(int i=0;i<7;i++){          for(int j=0;j<8;j++){             this.setCell(j, i, m_map[i][j]);          }       }        }}

⌨️ 快捷键说明

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