public UserPokemonDataInfo(UserPokemonData data) { this.Teams = CollectionInfo.FromCollection(data.Teams); this.Boxes = CollectionInfo.FromCollection(data.Boxes); this.Recycler = RecyclerInfo.FromRecycler(data.Recycler); this.SaveInterval = data.SaveInterval; }
private static UserPokemonData Load(Stream stream) { var data = new UserPokemonData(); UserPokemonDataInfo dataInfo = Serializer.Deserialize<UserPokemonDataInfo>(stream); data.Teams = dataInfo.Teams.ToCollection(UserPokemonData.TeamSize); data.Boxes = dataInfo.Boxes.ToCollection(UserPokemonData.BoxSize); data.Recycler = dataInfo.Recycler.ToRecycle(); data.dataSaver = new DataSaver(data, dataInfo.SaveInterval); return data; }
private static UserPokemonData Create() { var data = new UserPokemonData(); data.Teams = new PokemonCollection(UserPokemonData.TeamSize); data.Boxes = new PokemonCollection(UserPokemonData.BoxSize); data.Recycler = new PokemonRecycler(UserPokemonData.DefaultRecyclerSize); data.dataSaver = new DataSaver(data, UserPokemonData.DefaultSaveInterval); return data; }
public UserData() { _pokemonData = UserPokemonData.Load(); }