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

📄 banana.java

📁 初学者的佳音 初学者的佳音 初学者的佳音 初学者的佳音 初学者的佳音
💻 JAVA
字号:
package game;

import lib.*;
import javax.microedition.lcdui.*;

//香蕉皮
public class Banana extends Sprite{

  private Resource resource=Resource.getResource();
  private boolean needRemove;

  public Banana(int x,int y){
    setPosition(x,y);
    setWidth(12);
    setHeight(10);
  }
  public void paint(Graphics g,int offsetX,int offsetY){
    Toolkit.drawRegion(g,resource.imgProp,47,11,12,10,getX()+offsetX,getY()+offsetY);
  }
  public void collideVertical(){
    needRemove=true;
  }
  public void collideHorizontal(){
    needRemove=true;
  }
  public boolean isNeedRemove(){
    return needRemove;
  }
}

⌨️ 快捷键说明

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