?? linker.java
字號:
package org.gamecollege.j2me.rpg;
public class Linker {
int ID;
/**
* linker對象所屬的MapID
*/
int belongMapID;
/**
* linker對象所在行號
*/
int rowNo;
/**
* linker對象所在列號
*/
int colNo;
/**
* 下一關卡的ID
*/
int nextLevelID;
/**
* 下一個地圖的ID
*/
int nextMapID;
/**
* 下一個地圖中英雄的出現位置的行號
*/
int newHeroRowNo;
/**
* 下一個地圖中英雄的出現位置的列號
*/
int newHeroColNo;
public boolean crashHero(Player player,int tw,int th) {
boolean result = false;
int px=player.getSprite(Player.STATUS_WALK).getX();
int py=player.getSprite(Player.STATUS_WALK).getY();
int pw=player.getSprite(Player.STATUS_WALK).getWidth();
int ph=player.getSprite(Player.STATUS_WALK).getHeight();
int lx=colNo*tw;
int ly=rowNo*th;
int lw=tw;
int lh=th;
result=Tools.isIntersectingRect(lx,ly,lw,lh,px,py,pw,ph);
return result;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -