public void DisplayJobSelection()
    {
        textOutput = "Available Job\n\n" +
                     "Job 1: " + jobsManager.jobList[0].jobName + "\n" +
                     "Deliver " + jobsManager.jobList[0].cargoName + " to " + jobsManager.jobList[0].destination +
                     //" within " + jobsManager.jobList[0].targetDeliveryTime + " days to collect " + jobsManager.jobList[0].cargoValue + " copper coins per cubic meter of cargo." +
                     "\n\n";

        if (jobsManager.numberOfJobs >= 2)
        {
            textOutput += "Job 2: " + jobsManager.jobList[1].jobName + "\n" +
                          "Deliver " + jobsManager.jobList[1].cargoName + " to " + jobsManager.jobList[1].destination +
                          //" within " + jobsManager.jobList[1].targetDeliveryTime + " days to collect " + jobsManager.jobList[1].cargoValue + " copper coins per cubic meter of cargo." +
                          "\n\n";
        }

        if (jobsManager.numberOfJobs >= 3)
        {
            textOutput += "Job 3: " + jobsManager.jobList[2].jobName + "\n" +
                          "Deliver " + jobsManager.jobList[2].cargoName + " to " + jobsManager.jobList[2].destination +
                          //" within " + jobsManager.jobList[2].targetDeliveryTime + " days to collect " + jobsManager.jobList[2].cargoValue + " copper coins per cubic meter of cargo." +
                          "\n\n";
        }

        textOutput += "(Press job number to accept a job)";

        if (jobsManager.activeJob != null)
        {
            textOutput += "\n\nActive Job: " + jobsManager.activeJob.jobName;
        }

        monitor.ChangeFontSize(28);
        monitor.ChangeAlignmentToMiddleLeft();
        monitor.WriteToMonitor(textOutput);
    }
Beispiel #2
0
    private void OutputSpeachData(List <string> voices, int langID)
    {
        string output = "Available voices:\n";

        for (int i = 0; i < voices.Count; i++)
        {
            if (i == langID)
            {
                output += "<b>";
            }
            output += voices[i] + "\n";
            if (i == langID)
            {
                output += "</b>";
            }
        }

        output += "\n";
        output += $"Volume: {SpeechService.Instance.Volume}\n";
        output += $"Pitch: {SpeechService.Instance.Pitch}\n";
        output += $"Rate: {SpeechService.Instance.Rate}\n";

        output += $"\n<b><i>Press button below to change voice</i></b>";

        monitor.WriteToMonitor(output);
    }
    // Update is called once per frame
    void Update()
    {
        UpdateInternalShipTemp();

        //Sets text output and sends it to the ship's main monitor.
        textOutput  = "Barrow Freight Interplanetary";
        textOutput += "\nShip Power usage: " + currentShipPowerConsumption + "/" + currentShipPowerCapacity + "Gw";
        textOutput += "\nCurrent  Ship Speed " + previousFrameShipSpeed + "LSPS";
        textOutput += "\nCurrent Ship Temp: " + currentShipTemp.ToString("F1") + "C";
        textOutput += "\nCurrent  Ship Cooling Rate: " + currentShipCoolingRate + "";
        textOutput += "\nShip Com Range: " + maxShipComRange + "KM";
        textOutput += "\nHeat Generation: " + totalShipHeatGeneration;
        textOutput += "\nCurrency: " + currency;

        TerminalMonitor monitor = GameObject.Find("Mission Monitor").GetComponentInChildren <TerminalMonitor>();

        monitor.WriteToMonitor(textOutput);



        //Reset current power usage, so that it does not continue to increase every frame.
        currentShipPowerConsumption = 0;
        currentShipPowerCapacity    = baseShipPowerCapacity;
        previousFrameShipSpeed      = currentShipSpeed;
        currentShipSpeed            = 10;
        currentShipCoolingRate      = baseShipCoolingRate;
        maxShipComRange             = 0;
        consumedShipCargoCapacity   = 0;
        //currentShipTemp = baseShipTemp;
        totalShipHeatGeneration = 0;
    }
    public void UpdateETAClock()
    {
        string timeText;
        float  stasisTimeMultiplier;

        if (activeJob != null)
        {
            if (isInStasis)
            {
                stasisTimeMultiplier = 1000000;
                blackScreen.SetAlpha(1f);
                Debug.Log("in stasis");
            }
            else
            {
                Debug.Log("Not in stasis");
                stasisTimeMultiplier = 1;
            }
            currentDist = currentDist /*LS*/ - (ship.previousFrameShipSpeed /*LSPS*/ * (Time.deltaTime /*S*/ * stasisTimeMultiplier));
            eta /*S*/   = currentDist /*LS*/ / ship.previousFrameShipSpeed /*LSPS*/;

            Debug.Log(currentDist);
            Debug.Log(eta);

            TimeSpan timeSpan = TimeSpan.FromSeconds(eta);
            timeText = string.Format("{0:D3}:{1:D2}:{2:D2}:{3:D2}", timeSpan.Days, timeSpan.Hours, timeSpan.Minutes, timeSpan.Seconds);

            if (eta < 0)
            {
                activeJob.jobComplete = true;
                ship.UpdateCurrency(activeJob.cargoValue);
                timeText = "Job Complete";
                jobsCompleted++;
                activeJob  = null;
                isInStasis = false;
                blackScreen.SetAlpha(0f);
            }
        }
        else
        {
            timeText = "No Destination Selected";
        }

        etaClock.WriteToMonitor(timeText);
    }