📄 pl.java
字号:
import javax.microedition.lcdui.Image;
public class PL extends MySprite
{
public PL(Image _im, int[][] _pd, int[] _fs)
{
super(_im, _pd, _fs);
x=y=100;
}
public void upData(boolean u,boolean d,boolean l,boolean r, MC mc)
{
this.nextFrame() ;
if(u==true)
{
y-=5;
if(y-mc.cy<20)
{
mc.cy-=5;
}
}
if(d==true)
{
y+=5;
if(y-mc.cy>250)
{
mc.cy+=5;
}
}
if(l==true)
{
x-=5;
if(x-mc.cx<20)
{
mc.cx-=5;
}
}
if(r==true)
{
x+=5;
if(x-mc.cx>200)
{
mc.cx+=5;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -