示例#1
0
 IEnumerator textEffect()
 {
     UItxt.text = "";
     for (int i = 0; i < txt2show.Length; i++)
     {
         cAud.playClip(2);
         UItxt.text += txt2show[i];
         yield return(new WaitForSeconds(Random.Range(0.05f, .25f)));
     }
 }
示例#2
0
    string CHECKLISTcmd() // displays laucnch checklist
    {
        string output = string.Format("Launch Checklist:\nDiagnostics: {0} \nFuel: {1} \nBattery: {2} \nSystems Status: {3} \n", checklist.passDiag, checklist.Fuel, checklist.Batt, checklist.sys_State);

        output = output.Replace("True", "<color=green>Passed</color>");
        output = output.Replace("False", "<color=red>Failed</color>");
        if (checklist.passDiag && checklist.Fuel && checklist.Batt && checklist.sys_State)
        {
            checklist.Passed = true;
            output          += "<color=green>Ready for launch</color>\n";
        }
        else
        {
            audioMngr.playClip(0);
            checklist.Passed = false;
            output          += "<color=red>Not Ready for Launch</color>\n";
            if (!checklist.sys_State)
            {
                output += "<color=red>System State must equal " + checklist.req_sysState + "</color>\n";
            }
        }
        return(output);
    }