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

📄 drawmap.java~1~

📁 全面运用所学的JAVA理论对所设计的类进一步完善
💻 JAVA~1~
字号:
package tankgame2007;
/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2007</p>
 * <p>Company: </p>
 * @author not attributable
 * @version 1.0
 */
import java.awt.*;
public class DrawMap {
  private Image mapSource;
  private int tile_width;
  private int tile_height;
  private int tile_rows;
  private int tile_cols;
  private int map_rows;
  private int map_cols;

  private MediaTracker MT;

  private Image tiles[];
  private Image tempImage;

  public DrawMap(Image mapSource,   //原始图片
                 int tile_width,    //小块宽度
                 int tile_height,   //小块高度
                 int tile_rows,     //原始图片高度
                 int tile_cols,     //原始图片宽度
                 int map_rows,      //地图高度
                 int map_cols       //地图宽度
                 ) {
    this.mapSource = mapSource;
    this.tile_width = tile_width;
    this.tile_height = tile_height;
    this.tile_rows = tile_rows;
    this.tile_cols = tile_cols;
    this.map_rows = map_rows;
    this.map_cols = map_cols;
    tiles=GetCuttingImage.getImages(mapSource,tile_rows,tile_cols,tile_width,tile_height);
  }
  public void paintMap(Graphics g){
    for(int i=0;i<tiles.length;i++){
      if(MapArray.grass[i]>0){
        Image tempImage=tiles[i];
        int row=i%
      }




    }

  }


}

⌨️ 快捷键说明

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