nabobphoto.java

来自「一本介绍手机游戏开发的书中的源代码」· Java 代码 · 共 25 行

JAVA
25
字号
import javax.microedition.lcdui.*;

public class nabobPhoto
{
  int x, y, moveX, moveY;
  Image nabobImage;

  public nabobPhoto(int x, int y, int moveX, int moveY, Image nabobImage)
  {
     this.x=x;
     this.y=y;
     this.moveX=moveX;
     this.moveY=moveY;
     this.nabobImage=nabobImage;
  }

  public void paintMAP(Graphics g)
  {
    g.translate(x, y);
    g.setClip(moveX, moveY, 32, 32);
    g.drawImage(nabobImage, 0, 0, Graphics.LEFT | Graphics.TOP);
    g.translate(-x, -y);
    g.setClip(0, 0, 176, 208);
  }
}

⌨️ 快捷键说明

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