?? mainrole.java
字號:
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.Sprite;
/*
* Created on 2005-7-10
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
/**
* @author Yongzi
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class Mainrole extends Sprite {
int x;
int y;
int selecty=145; //菜單選擇鈕的Y坐標
int isduck=1;
int lastx;
int lasty;
int roomx,roomy;
int directionup=12,directiondown=0, directionleft=4,directionright=8;
/**
* @param arg0
*/
public Mainrole(Image img ,int width, int height, int positionx, int positiony,int roomx2,int roomy2) {
super(img,width,height);
x=positionx;
y=positiony;
roomx=roomx2;
roomy=roomy2;
}
public void move(int increasex, int increasey)
{
x=x+increasex;
y=y+increasey;
lastx=increasex;
lasty=increasey;
}
public void moveroom(int increasex, int increasey)
{
roomx=roomx+increasex;
roomy=roomy+increasey;
lastx=increasex;
lasty=increasey;
}
void unmove() {
move(-lastx, -lasty);
}
void unmoveroom() {
moveroom(-lastx, -lasty);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -