Esempio n. 1
0
    void Start()
    {
        editorScript = FindObjectOfType <AdventureEditor>();

        outputScript = FindObjectOfType <ScrollOutput>();
        dialogScript = FindObjectOfType <OutputDialog>();

        line_100  = FindObjectOfType <Line100>();
        line_200  = FindObjectOfType <Line200>();
        line_300  = FindObjectOfType <Line300>();
        line_1000 = FindObjectOfType <Line1000>();
        line_1100 = FindObjectOfType <Line1100>();
        line_1140 = FindObjectOfType <Line1140>();
        line_1200 = FindObjectOfType <Line1200>();
        line_1600 = FindObjectOfType <Line1600>();
        line_1900 = FindObjectOfType <Line1900>();
        line_2000 = FindObjectOfType <Line2000>();
        line_2100 = FindObjectOfType <Line2100>();
        line_2300 = FindObjectOfType <Line2300>();
        line_2400 = FindObjectOfType <Line2400>();
        line_2600 = FindObjectOfType <Line2600>();
        line_2700 = FindObjectOfType <Line2700>();
        line_2800 = FindObjectOfType <Line2800>();
        line_3000 = FindObjectOfType <Line3000>();
        line_3100 = FindObjectOfType <Line3100>();
        line_3200 = FindObjectOfType <Line3200>();
    }
Esempio n. 2
0
 private void WriteOutupt(string text, OutputFlag flag)
 {
     Dispatcher.Invoke(() =>
     {
         txbOutput.Text += DateTime.Now.ToShortTimeString() + " | " + flag.ToString() + " | " + text + "\n";
         ScrollOutput.ScrollToBottom();
     });
 }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        // Resume the game on start
        Time.timeScale = 1;

        outputScript = FindObjectOfType<ScrollOutput>();

        // Get the animator component
        pauseAnimation = pauseMenu.GetComponent<Animator>();

        // Disable it on start to stop it from playing the default animation
        pauseAnimation.enabled = false;
    }
Esempio n. 4
0
    /*
     * public void TypeText(string newMessage)
     * {
     *  print("Entering TypeText");
     *  // Set a reference to the GameObject 'Adventure Engine'
     *  GameObject adventureEngine = GameObject.Find("Adventure Engine");
     *
     *  // Access the 'DisplayOutput' class
     *  ScrollOutput outputScript = adventureEngine.GetComponent<ScrollOutput>();
     *
     *
     *  newMessage = newMessage.Replace("*", "\n");
     *
     *  text = "";
     *
     *  foreach (char c in newMessage)
     *  {
     *      if (c == '*')
     *      {
     *          outputScript.textOutput.text.TrimEnd('*');
     *
     *          outputScript.textOutput.text += '\n'.ToString();
     *      }
     *      else
     *      {
     *          text += c;
     *
     *          outputScript.textOutput.text = text.ToUpper();
     *      }
     *  }
     * }
     */



    private void DisplayDialog(string dialog)
    {
        // Set a reference to the GameObject 'Adventure Engine'
        GameObject adventureEngine = GameObject.Find("Adventure Engine");

        // Access the 'DisplayOutput' class
        ScrollOutput outputScript = adventureEngine.GetComponent <ScrollOutput>();


        // Length of string to display
        int stringLength = dialog.Length;

        // Index of character being displayed
        int characterIndex = 0;

        //dialog = dialog.Replace("*", "\n");

        text = "";

        while (characterIndex < stringLength)
        {
            print("characterIndex: " + characterIndex);
            //if ( dialog.Substring(characterIndex, 1).Contains( "*" ) )
            //{
            //print("Found *");
            //outputScript.textOutput.text.TrimEnd('*');
            //_textComponent.text.TrimEnd('*');

            //outputScript.textOutput.text += '\n'.ToString();
            //_textComponent.text += '\n'.ToString();
            //}
            //else
            //{
            print("dialog: " + dialog);
            text += dialog.Substring(characterIndex, 1);

            print("text: " + text);
            outputScript.dialogOutput.text = text.ToUpper();
            //_textComponent.text = text.ToUpper();

            //characterIndex++;
            //}

            characterIndex++;
        }
    }
Esempio n. 5
0
 void Start()
 {
     outputScript = FindObjectOfType <ScrollOutput>();
 }