private static TriggerContext single;
private void init(){
System.out.println("�������");
XMLdoc doc = new XMLdoc("res/map/all_trigger.xml");
doc.openXML();
Element root = doc.getRootElement();
for(Iterator<?> itr = root.elementIterator();itr.hasNext();){
Element em = (Element) itr.next();
String id = em.attributeValue("id");
int type = Integer.valueOf(em.attributeValue("type"));
String mapping_id = em.attributeValue("mapping");
int cd = Integer.valueOf(em.attributeValue("cd"));
TriggerBase trigger = TriggerFactory.createTrigger(id);
trigger.setCd(cd);
trigger.setMappingId(mapping_id);
trigger.setType(type);
for (Iterator itrChild = em.elementIterator(); itrChild.hasNext();) {
Element el = (Element) itrChild.next();
String offset = el.attributeValue("action_offset");
System.out.println(offset);
trigger.addActionPoint(offset);
}
TriggerContext.map.putIfAbsent(id, trigger);
}
doc.closeXML();
}