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

📄 floorsprite.java

📁 一个经典的手机游戏原代码
💻 JAVA
字号:
import javax.microedition.lcdui.game.Sprite;import javax.microedition.lcdui.*;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public abstract class floorSprite extends Sprite {  public static int FLOOR_MOVE = 1;  private int frameWidth;  private int frameHeight;  private int scnWidth;  private int scnHeight;  private int frameNum;  public boolean isTurn;  public boolean isDoLive;//  public boolean isOn;  public floorSprite(Image img, int frameWidth, int frameHeight,               int scnWidth, int scnHeight) {    super(img, frameWidth, frameHeight);    this.frameWidth = frameWidth;    this.frameHeight = frameHeight;    this.scnWidth = scnWidth;    this.scnHeight = scnHeight;  }  public void init(int x, int y) {//    isOn = false;    isTurn = false;    isDoLive = false;    frameNum = 0;    setFrame(0);//    if (getHeight() > 5)//      setPosition(x, y-(getHeight()-5));//    else      setPosition(x, y);  }  public boolean moveUp() {    int y = getY();    y = getHeight();    if (getY() + getHeight() - FLOOR_MOVE > 0) {      move(0, -1 * FLOOR_MOVE);      return true;    }    return false;  }  abstract void doOn(playerSprite tempPlayer);  abstract void autoAction();}

⌨️ 快捷键说明

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