public void PrePhraseScenarioAsync(Scene s) { //开一个新的线程预加载 _loadedScenario.Add(s.Name, s); s.LoadScriptAsync(); // s.PhraseFinish(); }
// Use this for initialization void Start() { ScenarioName = "story"; ScenarioFileName = "story1"; NextScene = "loadingStory"; // ScriptEngine.Instance.LoadScript(ScriptFileName); s = new Scene(ScenarioFileName); s.Name = ScenarioName; ScenarioManager.Instance.PrePhraseScenarioAsync(s); StartCoroutine(LoadA()); }
public List<AbstractTag> Phrase(Scene s) { //reset _currentPhraseLineNo = 0; _uploadTags.Clear(); _scriptStream = s.ScriptContent; _scenario = s; Phrase(); return _uploadTags; }
public void Run(Scene scene) { _currentScene = scene; Debug.Log("Run Script!"); StartCoroutine(OnRun()); }
/* * @param string filePath: * 脚本文件在Resource下的路径 */ /* public void LoadScript(string filePath) { string path = Application.dataPath + Settings.SCENARIO_SCRIPT_PATH + filePath; if(!File.Exists(path)) { Debug.LogFormat("cannot find script file: {0}!", path); }else Debug.LogFormat("load script file: {0}!", path); StreamReader sr = File.OpenText(path); string str = sr.ReadToEnd(); sr.Close(); //_phraser.SetScript(str); _phraser.Phrase(); }*/ public void Phrase(Scene scenario) { _phraser.Phrase(scenario); }
public virtual bool Init() { _phraser = new KAGPhraser(); _currentScene = null; return true; }
public void PrePhraseScenario(Scene s) { _loadedScenario.Add(s.Name, s); s.LoadScript(); s.PhraseFinish(); }