示例#1
0
 public EntityEventHandler(TygronEntity entity) {
   this.entity = entity;
   EventManager.addListener(
       this,
       MapLink.STAKEHOLDERS,
       MapLink.ACTION_MENUS,
       MapLink.ACTION_LOGS,
       MapLink.FUNCTIONS,
       MapLink.BUILDINGS,
       MapLink.SETTINGS,
       MapLink.ZONES,
       MapLink.LANDS,
       MapLink.POPUPS);
   EventManager.addListener(this, Network.ConnectionEvent.FIRST_UPDATE_FINISHED);
 }
示例#2
0
 /** @return true if cache is ready for use (currently it must have STAKEHOLDERS). */
 private boolean isReady() {
   ItemMap<Item> map = EventManager.getItemMap(MapLink.STAKEHOLDERS);
   return map != null && map.size() > 0;
 }
示例#3
0
 public void stop() {
   EventManager.removeAllListeners(this);
 }