?? mymiss.java
字號(hào):
package game0925;
import javax.microedition.lcdui.*;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class MyMiss extends Sprite {
protected Image mymissimg;
public Image burstimg;
public MyMiss(int x, int y,boolean isAlive) {
if (mymissimg == null) {
mymissimg = ImageTools.getImage("/img/bullet.png");
burstimg = ImageTools.getImage("/pic/burst.png");
}
this.x = x;
this.y = y;
this.isAlive=isAlive;
}
/**
* doMove
*
* @todo Implement this game0925.Sprite method
*/
void doMove() {
y = y - 10;
}
/**
* paint
*
* @param g Graphics
* @todo Implement this game0925.Sprite method
*/
void paint(Graphics g) {
if (!this.isHit()) {
g.drawImage(mymissimg, x, y, Graphics.TOP | Graphics.LEFT);
} else {
g.drawImage(burstimg, x, y, Graphics.TOP | Graphics.LEFT);
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)