public void Save(string creatureName) { UpdateBoneConfiguration(); UpdateAttachedBodyPartsConfiguration(); CreatureData data = new CreatureData() { bones = this.data.bones, attachedBodyParts = this.data.attachedBodyParts, patternID = this.data.patternID, primaryColour = this.data.primaryColour, secondaryColour = this.data.secondaryColour }; SaveUtility.Save(JsonUtility.ToJson(data), creatureName + ".json"); }
public void CreateNewRecord() { LoadRecordList(); for (int i = 0;; i++) { string theName = "Record" + i.ToString("x8"); if (!Records.ContainsKey(theName)) { Record record = new Record { recordName = theName }; SaveUtility.Save <Record>(record, GAME_RECORD_DATA_PATH + record.recordName + ".data"); break; } } LoadRecordList(); }
public void SaveGlobalData() { RememberGlobalData(); SaveUtility.Save(GlobalGameData, GAME_GLOBAL_DATA_PATH + "GameData.data"); }
public void SaveRecord(Record record) { RememberRecordData(record); SaveUtility.Save <Record>(record, GAME_RECORD_DATA_PATH + record.recordName + ".data"); }
public void SaveRoom(Room room, string path) { SaveUtility.Save <Room>(room, path); }