コード例 #1
0
    public void print(string msg)
    {
        GameObject composer   = GameObject.Find("Composer");
        Composer   textWriter = composer.GetComponent <Composer> ();

        textWriter.PrintLn(msg);
        textWriter.CalculateLines();
    }
コード例 #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);
    }