public void LoadClass(string content) { ClassSaveHelper helper = new ClassSaveHelper(); helper.LoadClassJsonString(content); helper.LoadValue(nameof(hp), out hp); }
public void LoadClass(string content) { ClassSaveHelper helper = new ClassSaveHelper(); helper.LoadClassJsonString(content); SerializableVector3 temp; helper.LoadValue(nameof(transform.position), out temp); transform.position = SerializableConvert.DeserializableVector3(temp); //Dictionary<string, string> dicContent = JsonConvert.DeserializeObject<Dictionary<string, string>>(content); //string temp; //dicContent.TryGetValue(nameof(transform.position), out temp); //transform.position = SerializableConvert.DeserializableVector3(JsonConvert.DeserializeObject<SerializableVector3>(temp)); }
public void LoadClass(string content) { ClassSaveHelper helper = new ClassSaveHelper(); helper.LoadClassJsonString(content); helper.LoadValue(nameof(deathNumberInScenes), out deathNumberInScenes); helper.LoadValue(nameof(deadBySlimer), out deadBySlimer); helper.LoadValue(nameof(deadByMinotaur), out deadByMinotaur); helper.LoadValue(nameof(deadByWitch), out deadByWitch); helper.LoadValue(nameof(deadByFalling), out deadByFalling); helper.LoadValue(nameof(deadByYourself), out deadByYourself); helper.LoadValue(nameof(hitBySlimer), out hitBySlimer); helper.LoadValue(nameof(hitByMinotaur), out hitByMinotaur); helper.LoadValue(nameof(hitByWitch), out hitByWitch); helper.LoadValue(nameof(fireElementConsumption), out fireElementConsumption); helper.LoadValue(nameof(thunderElementConsumption), out thunderElementConsumption); helper.LoadValue(nameof(iceElementConsumption), out iceElementConsumption); helper.LoadValue(nameof(windElementConsumption), out windElementConsumption); helper.LoadValue(nameof(passSceneTimes), out passSceneTimes); helper.LoadValue(nameof(MSpellTime), out MSpellTime); helper.LoadValue(nameof(MASpellTime), out MASpellTime); helper.LoadValue(nameof(MBSpellTime), out MBSpellTime); helper.LoadValue(nameof(ASpellTime), out ASpellTime); helper.LoadValue(nameof(BSpellTime), out BSpellTime); helper.LoadValue(nameof(MABSpellTime), out MABSpellTime); helper.LoadValue(nameof(jumpNumber), out jumpNumber); helper.LoadValue(nameof(shortSpellTime), out shortSpellTime); helper.LoadValue(nameof(fullySpellTime), out fullySpellTime); helper.LoadValue(nameof(wantFullyButFailedTimeForShortPressedTime), out wantFullyButFailedTimeForShortPressedTime); helper.LoadValue(nameof(wantFullyButFailedTimeForElementNotEnough), out wantFullyButFailedTimeForElementNotEnough); helper.LoadValue(nameof(wantFullyButFailedTimeForBeInterrupted), out wantFullyButFailedTimeForBeInterrupted); }