Ejemplo n.º 1
0
        private void SetPersistentVersion(string version)
        {
            JsonObject persistentVersionInfoJo = new JsonObject();

            persistentVersionInfoJo.Add(ConstValue.VERSION_KEY, version);
            byte[] persistentVersionInfoBytes = ConvertExt.StringToBytes(persistentVersionInfoJo.ToString());
            FileManager.Write(ConstValue.PERSISTENT_DIR_PATH + "/" + m_ModuleName + "/" + ConstValue.VERSION_NAME, persistentVersionInfoBytes);
        }
Ejemplo n.º 2
0
        private byte[] CustomLoad(ref string filename)
        {
            string extension = ".lua";

            filename = filename.EndsWith(extension) ? filename.Substring(0, filename.Length - extension.Length) : filename;
            string    relativePath = filename.Replace(".", "/") + extension;
            TextAsset textAsset    = LoadLua(relativePath);

            if (textAsset)
            {
                return(ConvertExt.StringToBytes(textAsset.text));
            }
            return(null);
        }
Ejemplo n.º 3
0
 private void SetPersistentFileList()
 {
     byte[] persistentFileListBytes = ConvertExt.StringToBytes(m_PersistentFileList.ToString());
     FileManager.Write(ConstValue.PERSISTENT_DIR_PATH + "/" + m_ModuleName + "/" + ConstValue.FILE_LIST_NAME, persistentFileListBytes);
 }