Ejemplo n.º 1
0
 @Override
 public void destruct(Mission target) {
   getTr().removePropertyChangeListener(TRFactory.RUN_STATE, runStateListener);
   getMenuSystem().removeMenuItemListener(menuSelectionListener, PAUSE_MENU_PATH);
   getMenuSystem().removeMenuItem(PAUSE_MENU_PATH);
   pause.removePropertyChangeListener(controllerListener);
 }
Ejemplo n.º 2
0
 @Override
 public void apply(Mission mission) {
   setTr(Features.get(Features.getSingleton(), TR.class));
   setMenuSystem(Features.get(getTr().getRootWindow(), MenuSystem.class));
   final ControllerMapper mapper = Features.get(Features.getSingleton(), ControllerMapper.class);
   final ControllerInputs inputs = Features.get(mapper, ControllerInputs.class);
   pause = inputs.getControllerInput(PAUSE);
   this.mission = new WeakReference<Mission>(mission);
   pause.addPropertyChangeListener(controllerListener);
   getMenuSystem().addMenuItem(MenuSystem.MIDDLE, PAUSE_MENU_PATH);
   getMenuSystem().addMenuItemListener(menuSelectionListener, PAUSE_MENU_PATH);
   getTr().addPropertyChangeListener(TRFactory.RUN_STATE, runStateListener);
 }