using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[System.Serializable]
public class PlayerInfo {
public string playerName = "Default Name";
public int health = 100;
public List<InventoryItem> inventory = new List<InventoryItem>();
public static PlayerInfo Load()
{
var playerInfo = Doofah.GenericSerialiser.LoadFromPlayerPrefs<PlayerInfo>("PlayerInfo");
return playerInfo != null ? playerInfo : new PlayerInfo();
}
public void Save()
{
Doofah.GenericSerialiser.SaveToPlayerPrefs("PlayerInfo", this);
}
}