// Update is called once per frame
 void Update()
 {
     if (input.inputString.Length == 5)
     {
         if (input.inputString == "F4L79" && !fileReceived)
         {
             main.dropCapsule();
             input.inputString = "";
             messageBoxController.showMessageBox("Info", "Please receive the file capsule through the mechanized archieve tube. \n \n Пожалуйста, получите капсулу с файлом через трубу механизованного архива.", 8f);
             fileReceived = true;
         }
         else
         {
             input.inputString = "";
             messageBoxController.showMessageBox("Error", "There was an error while retrieving the selected file. \n \n Во время получения файла возникла ошибка.", 8f);
         }
     }
 }
Exemple #2
0
    // Матрицф кнопок изменилась => пользователь что-то переключил, действуем.
    void buttonMatrixChanged(int index, char value)
    {
        bool b = value == '0';

        //windowGrid
        if (index == 4)           // охлаждение
        {
            windowGrid.windowsEnabled [5] = b;
            CircularSineWaveVis.enabled   = b;
            graphDisplay.enabled          = b;
        }
        else if (index == 5)             // Спутник
        {
            windowGrid.windowsEnabled [4] = b;
        }
        else if (index == 7)             // Спутник
        {
            windowGrid.windowsEnabled [3] = b;
        }
        else if (index == 13)             // Спутник
        {
            windowGrid.windowsEnabled [2] = b;
            archive.isOn = b;
        }
        else if (index == 33 && b)
        {
            //print ("Unable to stop the enslavement of the world once it's started!");
            messageBoxController.showMessageBox("Error", "Unable to stop the enslavement of the world once it's started!  \n \n Невозможно остановить порабощение после его запуска!", 8f);
        }
        else if (index == 32 && !b)
        {
            //print ("Unable to stop the enslavement of the world once it's started!");
            messageBoxController.showMessageBox("WARNING!", "Hacking world's nuclear missiles, nuclear apocalypse in 60 minutes!  \n \n Взлом ядерных боеголовок, атомная война через 60 минут!", 8f);
        }
        else if (index == 24 && !b)
        {
            //print ("Unable to stop the enslavement of the world once it's started!");
            messageBoxController.showMessageBox("WARNING!", "You don't wanna know what that does, but you are dead anyways... \n \n Вам лучше не знать что вы только что запустили, но жить вам осталось не долго...", 8f);
        }
        else if (index == 11 && !b)
        {
            powerPanel.core_1_inc();
        }
        else if (index == 10 && !b)
        {
            powerPanel.core_1_dec();
        }
        else if (index == 19 && !b)
        {
            powerPanel.core_2_inc();
        }
        else if (index == 18 && !b)
        {
            powerPanel.core_2_dec();
        }
        else if (index == 9)
        {
            if (powerPanel.ionsPurged)
            {
                messageBoxController.showMessageBox("ERROR!", "Can not start CORE 1! No ions detected! \n \n Не возможно запустить ЯДРО 1 при сброшенных ионах!", 8f);
            }
            else
            {
                powerPanel.cores [0].isOn = !b;
            }
        }
        else if (index == 8)
        {
            if (powerPanel.ionBlock && !b)
            {
                messageBoxController.showMessageBox("ERROR!", "Can not start CORE 2! Ion block detected! \n \n Не возможно запустить ЯДРО 2! Обнаружен блок ионов!", 8f);
            }
            else if (powerPanel.ionsPurged)
            {
                messageBoxController.showMessageBox("ERROR!", "Can not start CORE 2! No ions detected! \n \n Не возможно запустить ЯДРО 2 при сброшенных ионах!", 8f);
            }
            else
            {
                powerPanel.cores [1].isOn = !b;
            }
        }
        else if (index == 3 && !b)
        {
            if (powerPanel.ionsPurged)
            {
                messageBoxController.showMessageBox("NOTE", "Need to refill ions first. \n \n Перед увеличением скорости, нужно заменить ионы.", 8f);
            }
            else
            {
                powerPanel.ionSpeed_inc();
            }
        }
        else if (index == 2 && !b)
        {
            powerPanel.ionSpeed_dec();
        }
        else if (index == 1 && !b)             //Сброс
        {
            if (!powerPanel.ionBlock)
            {
                messageBoxController.showMessageBox("NOTE", "No Ion Errors detected, Ion purge not needed. \n \n Не обнаружены ошибки ионов, сброс не требуется.", 8f);
            }
            else
            {
                powerPanel.ionPurge();
                //powerPanel.cores [0].isOn = false;
                //powerPanel.cores [1].isOn = false;
            }
        }
        else if (index == 0 && !b)             //Замена
        {
            if (powerPanel.ionsPurged)
            {
                powerPanel.ionRefill();
            }
            else
            {
                messageBoxController.showMessageBox("NOTE", "Need to purge active ions first. \n \n Перед заменой требуется сбросить активные.", 8f);
            }
        }
        else if (index == 6)             // Спутник
        {
            if (b)
            {
                DOTween.PlayBackwards("CommWindowHide");
            }
            else
            {
                DOTween.PlayForward("CommWindowHide");
            }
        }
        else if (index == 12)             // Спутник
        {
            if (b)
            {
                displayDemographics = true;
                DOTween.PlayBackwards("DemographicsHide");
            }
            else
            {
                displayDemographics = false;
                DOTween.PlayForward("DemographicsHide");
            }
        }
        else if (index == 39)             // Синхр маг полей вкл
        {
            Sync.SetActive(b);
            X.SetActive(b && syncX);
            Y.SetActive(b && syncY);
            SyncEnabled = b;
        }
        else if (index == 38)             //X
        {
            X.SetActive(b && SyncEnabled);
            syncX = b;
        }
        else if (index == 37)             //Y
        {
            Y.SetActive(b && SyncEnabled);
            syncY = b;
        }
        else if (index == 36)             //PK
        {
            PK.SetActive(b);
            PK_Enabled = b;
        }
        else if (index == 35)             //BSM
        {
            BSM.SetActive(b);
            BSM_Enabled = b;
        }
        else if (index == 34)             //AZ
        {
            AZ.SetActive(b);
            AZ_Enabled = b;
        }
        else if (index == 26)             //Reserve CH
        {
            b = !b;
            Reserve_Enabled = b;
            GSM.SetActive(b && GSM_Enabled);
            LTE.SetActive(b && LTE_Enabled);
            Wifi.SetActive(b && Wifi_Enabled);
            Antenna.SetActive(b && Antenna_Enabled);
            Dish.SetActive(b && Dish_Enabled);
        }
        else if (index == 28)             //GSM
        {
            GSM.SetActive(b && Reserve_Enabled);
            GSM_Enabled = b;
        }
        else if (index == 29)             //LTE
        {
            LTE.SetActive(b && Reserve_Enabled);
            LTE_Enabled = b;
        }
        else if (index == 30)             //Wifi
        {
            Wifi.SetActive(b && Reserve_Enabled);
            Wifi_Enabled = b;
        }
        else if (index == 31)             //Antenna-Radio
        {
            Antenna.SetActive(b && Reserve_Enabled);
            Antenna_Enabled = b;
        }
        else if (index == 27)             //Dish(sat)
        {
            Dish.SetActive(b && Reserve_Enabled);
            Dish_Enabled = b;
        }
        else if (index == 16)
        {
            commsDisable = !b;
        }
        else if (index == 17)
        {
            firewall = !b;
        }
    }