Examples of Gate


Examples of buildcraft.transport.Gate

    @Override
    public void onDetachedPipe(IPipeTile pipe, ForgeDirection direction) {
      TileGenericPipe pipeReal = (TileGenericPipe) pipe;
      if (!pipeReal.getWorld().isRemote) {
        Gate gate = pipeReal.pipe.gates[direction.ordinal()];
        if (gate != null) {
          gate.resetGate();
          pipeReal.pipe.gates[direction.ordinal()] = null;
        }
        pipeReal.scheduleRenderUpdate();
      }
    }
View Full Code Here

Examples of cascading.flow.stream.duct.Gate

    for( int i = 0; i < 10; i++ )
      values.add( "value" );

    TestSourceStage source = new TestSourceStage<String>( values );

    Gate gate = new TestGate();
    CountingItemStage stage = new CountingItemStage<String, String>();

    TestSinkStage sink = new TestSinkStage<String>();

    StreamGraph graph = new StreamGraph();
View Full Code Here

Examples of cl.alejo.jcsim.csim.dom.Gate

      for (int i = 0; i < gateData.length; i++) {
        // Primero recorro el arreglo de datos y parametros
        int[][] connectTo = gateData[i].connectTo;

        // Ahora recorro todos los pines de ese gate conectandolos
        Gate gateA = gates[i];
        int pinCountGateA = gateA.pinCount();
        for (int pinId = 0; pinId < pinCountGateA; pinId++) {
          // REcupero el gate y el pin
          Gate gateB = gates[connectTo[pinId][0]];

          // Si las compuertas son distintas
          if (gateA != gateB) {
            Pin pinB = gateB.getPin(connectTo[pinId][1]);
            Pin pinA = gateA.getPin(pinId);
            // Los conecto si no son los mismos
            if (pinA != pinB)
              pinA.connect(pinB);
          }
View Full Code Here

Examples of cl.alejo.jcsim.csim.dom.Gate

    // Ahora la vamos llenando
    // Para cada gate
    int currentGate = 0;
    Iterator iterGate = listGates.iterator();
    while (iterGate.hasNext()) {
      Gate gate = (Gate) iterGate.next();
      int[][] connectTo = gateData[currentGate].connectTo;

      // ahora por cada pin
      int pcount = gate.pinCount();
      for (int pinId = 0; pinId < pcount; pinId++) {
        Pin pin = gate.getPin(pinId);

        // Tomo el siguiente
        Pin nextPin = (Pin) pin.next();

        // Busco el indice del gate en la lista
View Full Code Here

Examples of cl.alejo.jcsim.csim.dom.Gate

    Iterator iter = listGates.iterator();
    int i = 0;

    // Ciclo
    while (iter.hasNext()) {
      Gate gate = (Gate) iter.next();
      int[][] connectTo = new int[gate.pinCount()][2];
      gateData[i++] = new EncapsulatedGateData(gate.getGateDescriptor(), (GateParameters) gate.getParameters()
        .clone(), connectTo);
      // El indice aumenta en la cantidad de pines de la compuerta

    }
  }
View Full Code Here

Examples of cl.alejo.jcsim.csim.dom.Gate

    // ********************************************************************************
    // El reloj
    // ********************************************************************************
    ParamClk paramClk = new ParamClk(300, 300);
    GateDescriptor descClk = new ClkDescriptor((ParamClk) paramClk.clone());
    Gate clk = new Clk(circuit, descClk, paramClk);
    IconGate iconClk = new IconGate(clk);
    circuit.addIconGate(iconClk, 100, 50);

    // El switch
    GateDescriptor descSwitch = new SwitchDescriptor((ParamSwitch) paramSwitch.clone());
    Gate switch1 = new Switch(circuit, descSwitch, paramSwitch);
    IconGate iconSwitch = new IconGate(switch1);
    circuit.addIconGate(iconSwitch, 300, 50);

    // Una banderita
    GateDescriptor descFlag = new FlagDescriptor();
    Gate flag = new Flag(circuit, descFlag, new ParamVoid());
    IconGate iconFlag = new IconGate(flag);
    circuit.addIconGate(iconFlag, 200, 50); // Superfluo

    // El lector de 7 segmentos
    GateDescriptor descDisp = new SegmentDisplayDescriptor((ParamSegmentDisplay) paramDisp.clone());
    Gate disp = new SegmentDisplay(circuit, descDisp, paramDisp);
    IconGate iconDisp = new IconGate(disp);
    circuit.addIconGate(iconDisp, 250, 50); // Superfluo */

    // Agrego el label
    circuit.addIconGate(iconLabel, 300, 100);
View Full Code Here

Examples of cl.alejo.jcsim.csim.dom.Gate

    int ndx = pinId;
    int ndxGate = connectOut[ndx][0];
    int ndxPin = connectOut[ndx][1];

    // Rescato el primer gate
    Gate gate = gates[ndxGate];
    Pin pinFirst = gate.getPin(ndxPin);

    // Agrego sus pines
    gate.getPinsAt(ndxPin, listPin);
    do {
      // busco el siguiente
      int[][] connectTo = gateData[ndxGate].connectTo;
      ndxGate = connectTo[ndxPin][0];
      ndxPin = connectTo[ndxPin][1];
      gate = gates[ndxGate];
      pinAux = gate.getPin(ndxPin);

      // Lo invoco recursivamente
      gate.getPinsAt(ndxPin, listPin);
    } while (pinFirst != pinAux);
  }
View Full Code Here

Examples of games.stendhal.server.entity.mapstuff.portal.Gate

  }

  @Override
  public void perform(final Player player, final RPAction action) {
    if ("gate".equals(action.get(CREATURE))) {
      final Gate gate = new Gate();
      gate.setPosition(action.getInt(X), action.getInt(Y));
      player.getZone().add(gate);
      return;
    }

    try {
View Full Code Here

Examples of it.freedomotic.objects.impl.Gate

            Iterator<EnvObjectLogic> it = EnvObjectPersistence.iterator();
            //check if this rooms has gates
            while (it.hasNext()) {
                EnvObjectLogic obj = it.next();
                if (obj instanceof Gate) {
                    Gate gate = (Gate) obj;
                    gate.evaluateGate();
                }
            }

            room.setChanged();
        } else {
View Full Code Here

Examples of it.freedomotic.objects.impl.Gate

                        visited.add(adiacent);

                        //operazione di enqueue coda
                        Room x = (Room) adiacent.getX();
                        Room y = (Room) adiacent.getY();
                        Gate gate = (Gate) adiacent.getValue();
                        boolean open = gate.isOpen();

                        if (open) {
                            if (x.getPojo().getName().equalsIgnoreCase(node.getPojo().getName())) {
                                queue.offer(y);
                                addLink(node); //from node
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.