Пример #1
0
    private IEnumerator RebootModule()
    {
        string moduleName  = interruptableModules[interrupted].BombModule.ModuleDisplayName;
        string message     = string.Format(rebootMessages[0], moduleName);
        int    messageHash = console.Show(message);

        for (int i = 1; i < rebootDuration + 1; i++)
        {
            yield return(new WaitForSeconds(1));

            message     = string.Format(rebootMessages[i % rebootMessages.Length], moduleName);
            messageHash = console.Replace(messageHash, message);
        }

        message = string.Format(rebootCompletedMessage, moduleName);
        console.Replace(messageHash, message);

        options.Clear();
        selectedOption = 0;

        ReactivateInterruptedModule();
    }