示例#1
0
 public void CompileNextLevel()
 {
     if (GrammarGenerator._FullGameScript != null)
     {
         generatorText = GrammarGenerator._FullGameScript;
         StopAllCoroutines();
         _program = GameCompiler.Compile(GrammarGenerator._FullGameScript);
         StartCoroutine(_program.Run());
     }
 }
示例#2
0
    public void CompileAndRun()
    {
        if (GameObject.Find("ScriptDisplay") != null)
        {
            grammarDisplay = GameObject.Find("ScriptDisplay").GetComponent <Text>();
        }

        if (GrammarGenerator._FullGameScript == null || GrammarGenerator._FullGameScript.Equals(""))
        {
            grammarDisplay.text = "Remember to press 'Generate Script' before creating the game!";
        }
        else
        {
            generatorText = GrammarGenerator._FullGameScript;
            StopAllCoroutines();
            _program = GameCompiler.Compile(GrammarGenerator._FullGameScript);
            StartCoroutine(_program.Run());
        }
    }