Esempio n. 1
0
 public boolean isNpcVisible(NPC npc) {
   Point p = npc.getPosOnScreen(mMapScreenPos);
   return p.x >= 0 && p.x < ResMap.WIDTH && p.y >= 0 && p.y <= ResMap.HEIGHT;
 }
Esempio n. 2
0
 /**
  * 创建配角号码npc,位置为(x,y),id为操作号
  *
  * @param id
  * @param npc
  * @param x
  * @param y
  */
 public void createNpc(int id, int npc, int x, int y) {
   NPC npcobj = (NPC) DatLib.GetRes(DatLib.RES_ARS, 2, npc);
   npcobj.setPosInMap(x, y);
   npcobj.setICanWalk(mCanWalk);
   mNPCObj[id] = npcobj;
 }