public void print(string msg)
    {
        GameObject composer   = GameObject.Find("Composer");
        Composer   textWriter = composer.GetComponent <Composer> ();

        textWriter.PrintLn(msg);
        textWriter.CalculateLines();
    }
Exemple #2
0
    public override bool Execute(Composer composer)
    {
        string currentText = composer.getCurrentText();

        string[] sentences = currentText.Split(new string[] { "\n" }, StringSplitOptions.None);
        string   command   = sentences [sentences.Length - 1];

        if (command != "")
        {
            composer.ExecuteCommand(command);
        }

        if (!composer.hasTypePermission())
        {
            return(true);
        }

        composer.setCurrentText(composer.getCurrentText() + "\n");
        composer.CalculateLines();
        return(true);
    }