Package cn.com.hotmaze.entity

Examples of cn.com.hotmaze.entity.TriggerBase


public class TriggerFactory {

  public static TriggerBase createTrigger(String triggerId){
    if(triggerId.equals("1")){
      TriggerBase tmp =  new BrigdeTrigger(triggerId, 0, null, 0);
      return tmp;
    }
    return null;
  }
View Full Code Here


        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);
       
      }
View Full Code Here

  public void InitAllTrigger() {
    for (int i = 0; i < heightCell; i++) {
      for (int j = 0; i < widthCell; i++) {
        if (!mapCell[i][j].getPlaced_trigger().equals("-1")) {// ����Ļ���
          String trigger = mapCell[i][j].getPlaced_trigger();
          TriggerBase tr = TriggerContext.getInstance().createTriggerById(trigger);
          this.triggers.add(tr);
       
        }
      }
    }
View Full Code Here

TOP

Related Classes of cn.com.hotmaze.entity.TriggerBase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.