// Use this for initialization
    void Start()
    {
        Debug.Log(testText.text);
        textLoader = new TextLoader(testText.text);
        resourceLoader.Initialize(this);

        sounder = new SoundProcessor();
        sounder.Initialize(resourceLoader);
        varProcessor = new VariableProcessor();
        varProcessor.Initialize(textLoader);
        sceneProcessor = new SceneProcessor();
        sceneProcessor.Initialize(this, resourceLoader);
        messenger.Initialize(textLoader, varProcessor);
        imager.Initialize(resourceLoader);

        processorList = new List <CommandProcessor>();
        processorList.Add(messenger);
        processorList.Add(imager);
        processorList.Add(sounder);
        processorList.Add(varProcessor);
        processorList.Add(sceneProcessor);
        processIndex = -1;

        onEnd = false;
    }
 public void ChangeScript(TextAsset newScript)
 {
     testText   = newScript;
     textLoader = new TextLoader(testText.text);
     varProcessor.Initialize(textLoader);
     onEnd = false;
 }