5354555657585960
for (int j = 0; j < texts.size(); j++) { Element elem = (Element) texts.get(j); helloText[j] = elem.getTextNormalize(); } npcs[i] = new Npc(id, 0, 0, animation, helloText); } }
5859606162636465666768
npcs[i] = new Npc(id, 0, 0, animation, helloText); } } public Npc getNpc(int id) { Npc npc = null; for (Npc e : npcs) { if (id == e.getUid()) { npc = e; break; }
163164165166167168169170171172173174175
Element e = (Element) childs.get(i); int id = e.getAttribute("id").getIntValue(); int posX = e.getAttribute("posX").getIntValue(); int posY = e.getAttribute("posY").getIntValue(); Npc npc = NpcLoader.getInstance().getNpc(id); npc.setX(posX); npc.setY(posY); npcs.addNpc(npc); } } catch (Exception e) { e.printStackTrace();