Skip to content
Snippets Groups Projects

save and load for weapon and pet

Merged Kenneth Ezekiel requested to merge load-and-save-pet-weapon into dev
Compare and
5 files
+ 16
1
Preferences
Compare changes
Files
5
@@ -23,6 +23,8 @@ public class GameSaveData
public PositionData positionData = new();
// Save the story state of the player
public StoryData storyData;
public List<Companion.Type> petData;
public List<int> weaponPoolIndex;
public string id;
@@ -43,6 +45,7 @@ public class GameSaveData
positionData = this.positionData,
storyData = this.storyData,
playerName = this.playerName,
petData = this.petData
};
string json = JsonUtility.ToJson(wrapper, true);
@@ -66,6 +69,7 @@ public class GameSaveData
this.positionData = wrapper.positionData;
this.storyData = wrapper.storyData;
this.playerName = wrapper.playerName;
this.petData = wrapper.petData;
Debug.Log("Game loaded from " + path);
return GameSaveManager.GameLoadResult.SUCCESS;
}