public void LosdScriptEngine(string fileName, Action onFinish) { string path = "AdventureScene/Text/" + fileName; TextAsset textAsset = AssetDataMng.Instance().LoadObject(path, null, true) as TextAsset; FileControlHelper fileControlHelper = new FileControlHelper(); AppCoroutine.Start(fileControlHelper.Decrypt(textAsset.bytes, new Action <byte[]>(this.OnLoadScriptFile)), onFinish, false); }
public IEnumerator InitializeScript(string fileName) { ScriptEngine scriptEngine = new ScriptEngine(); this.scriptEngine = scriptEngine; string path = "AdventureScene/Text/Guidance/" + fileName; TextAsset textAsset = AssetDataMng.Instance().LoadObject(path, null, true) as TextAsset; FileControlHelper fileControlHelper = new FileControlHelper(); return(fileControlHelper.Decrypt(textAsset.bytes, new Action <byte[]>(this.OnLoadScriptFile))); }
protected IEnumerator LoadScriptFile(string fileName, Action <string> onCompleted) { string filePath = this.GetFilePath(fileName); TextAsset textAsset = AssetDataMng.Instance().LoadObject(filePath, null, true) as TextAsset; Action <byte[]> onCompleted2 = delegate(byte[] loadData) { string empty = string.Empty; try { TypeSerializeHelper.BytesToData <string>(loadData, out empty); } catch { global::Debug.Log("チュートリアルファイルの読み込みに失敗しました。"); } if (onCompleted != null) { onCompleted(empty); } }; FileControlHelper fileControlHelper = new FileControlHelper(); return(fileControlHelper.Decrypt(textAsset.bytes, onCompleted2)); }