📄 npc5.java
字号:
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
public class NPC5 extends NPC
{
Image im;
int m,zn;
public NPC5(int _x,int _y,Image _im)
{
hp = 5;
im = _im;
x = _x;
y = _y;
m = zn =0;
last = false;
w = 40;
h = 40;
}
public void render(Graphics g)
{
Tools.paintImage( g,im,x-16,y-16,32,0,32,32);
}
public void upData(ZDManger zm)
{
last = true;
x+=2;
y+=4;
zn++;
if (zn == 20)
{
zm.ncreate( 3,x,y,10,10);
zn = 0;
}
}
public void destroy(TXManger tm)
{
tm.create( 1,x,y);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -