public void LoadFromSerializableUnlocks(SerializableUnlocks p) { this.unlockedAbilities = p.unlockedAbilities; maxHP = p.maxHP; maxEnergy = p.maxEnergy; baseDamage = p.baseDamage; }
public SerializableSave(Save s) { this.slotNum = s.slotNum; this.gameFlags = s.gameFlags; this.unlocks = s.unlocks.MakeSerializableUnlocks(); this.currentEnergy = s.currentEnergy; this.maxEnergy = s.maxEnergy; this.currentHP = s.currentHP; this.maxHP = s.maxHP; this.xPos = s.playerPosition.x; this.yPos = s.playerPosition.y; this.sceneName = s.sceneName; this.playerItems = s.playerItems; this.baseDamage = s.basePlayerDamage; persistentObjectKeys = new List <string>(); persistentObjectValues = new List <SerializedPersistentObject>(); foreach (KeyValuePair <string, SerializedPersistentObject> kv in s.persistentObjects) { persistentObjectKeys.Add(kv.Key); persistentObjectValues.Add(kv.Value); } }