Exemple #1
0
 public void Select(SelectableGate gate)
 {
     if (!targetMode)
     {
         selected = gate;
         selected.ActivateVisuals();
         currentGate.First = selected.PosY;
         ShowUI();
     }
     else
     {
         targetMode = false;
         allGates[selected.PosX][gate.PosY].SetName("T");
         allGates[selected.PosX][gate.PosY].SetRotation("");
         allGates[selected.PosX][gate.PosY].ActivateVisuals();
         currentGate.Second = gate.PosY;
         if (nextIsCRX)
         {
             gate.ActivateRX();
         }
         else
         {
             gate.ActivateX();
         }
         Apply();
     }
 }
Exemple #2
0
    public void ChooseType(int chosenType)
    {
        RotationHolder.SetActive(false);
        switch (chosenType)
        {
        case 0:
            currentGate.CircuitType = CircuitType.X;
            selected.ActivateX();
            break;

        case 1:
            currentGate.CircuitType = CircuitType.RX;
            RotationHolder.SetActive(true);
            selected.ActivateRX();
            break;

        case 2:
            currentGate.CircuitType = CircuitType.H;
            selected.ActivateH();
            break;

        case 3:
            currentGate.CircuitType = CircuitType.CX;
            selected.ActivateDot();
            targetMode = true;
            break;

        case 4:
            currentGate.CircuitType = CircuitType.CRX;
            targetMode = true;
            selected.ActivateDot();
            nextIsCRX = true;
            RotationHolder.SetActive(true);
            break;

        case 5:
            currentGate.CircuitType = CircuitType.X;
            selected.ActivateVisuals();
            break;

        default:
            break;
        }
    }