Пример #1
0
 public void PrePhraseScenarioAsync(Scene s)
 {
     //开一个新的线程预加载
     _loadedScenario.Add(s.Name, s);
     s.LoadScriptAsync();
        // s.PhraseFinish();
 }
Пример #2
0
 // 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());
 }
Пример #3
0
        public List<AbstractTag> Phrase(Scene s)
        {
            //reset
            _currentPhraseLineNo = 0;
            _uploadTags.Clear();

            _scriptStream = s.ScriptContent;

            _scenario = s;

            Phrase();
            return _uploadTags;
        }
Пример #4
0
 public void Run(Scene scene)
 {
     _currentScene = scene;
     Debug.Log("Run Script!");
     StartCoroutine(OnRun());
 }
Пример #5
0
        /*
         * @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);
        }
Пример #6
0
 public virtual bool Init()
 {
     _phraser = new KAGPhraser();
     _currentScene = null;
     return true;
 }
Пример #7
0
 public void PrePhraseScenario(Scene s)
 {
     _loadedScenario.Add(s.Name, s);
     s.LoadScript();
     s.PhraseFinish();
 }