Exemplo n.º 1
0
        public void Write(int chair)
        {
            SFSArray array = SFSArray.NewInstance();

            foreach (CpgSaveData saveData in _saveList[chair])
            {
                ISFSObject obj = new SFSObject();
                obj.PutInt(CpgType, (int)saveData.type);
                obj.PutIntArray(CpgValue, saveData.value);
                obj.PutInt(CpgIndex, saveData.index);

                array.AddSFSObject(obj);
            }
            string key = SaveDataKey + chair;

            PlayerPrefs.SetString(key, array.ToJson());
        }