www.pudn.com > TXWW.rar > 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;
}
}