Ejemplo n.º 1
0
  public Observable<Pair<IAutomationMethod, Float>> getKeyEvents() {
    ArrayList<Observable<Pair<IAutomationMethod, Float>>> keyEvents =
        new ArrayList<Observable<Pair<IAutomationMethod, Float>>>();

    for (Map.Entry<Component.Identifier, IAutomationMethod> entry :
        automationMethodHashMap.entrySet()) {

      IRxAutomationProjection projector = identifierToProjectionMap.get(entry.getKey());
      Observable<Pair<IAutomationMethod, Float>> keyEvent =
          projector.map(entry.getValue(), this.rxGamePad.getComponentById(entry.getKey()));
      keyEvents.add(keyEvent);
    }

    return Observable.merge(keyEvents);
  }
Ejemplo n.º 2
0
  public void save() {
    for (Map.Entry<Component.Identifier, IAutomationMethod> identifierAutomationMethodEntry :
        this.automationMethodHashMap.entrySet()) {
      IAutomationWriter writer =
          new AutomationWriter(
              getName(),
              "bind." + identifierAutomationMethodEntry.getKey().toString(),
              this.storage);
      identifierAutomationMethodEntry.getValue().write(writer);

      IRxAutomationProjection projection =
          getAutomationProjection(identifierAutomationMethodEntry.getKey());
      projection.write(writer);
    }

    this.storage.commit();
  }