Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 public void stop() {
   EventManager.removeAllListeners(this);
 }