public void GetObjectData(object obj, SerializationInfo info, StreamingContext context) { ChartRecordData pd = (ChartRecordData)obj; info.AddValue("playerBest", pd.playerBest); info.AddValue("playHistory", pd.playHistory); }
public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) { ChartRecordData pd = (ChartRecordData)obj; pd.playerBest = (PlayData)info.GetValue("playerBest", typeof(PlayData)); pd.playHistory = (PlayHistory)info.GetValue("playHistory", typeof(PlayHistory)); obj = pd; return(obj); }
public SaveData() { Chart[] charts; charts = Resources.LoadAll <Chart>("Charts"); playerChartRecordData = new ChartRecordData[charts.Length]; int x = 0; while (x < charts.Length) { playerChartRecordData[x] = new ChartRecordData(); x++; } }