Beispiel #1
0
        public void Save(string baseId)
        {
            FavoriteCoffeeState state = new FavoriteCoffeeState()
            {
                favoriteCoffees = favoriteCoffees,
                currentIndex    = currentIndex
            };

            SaveLoadSystem.Save <FavoriteCoffeeState>(state, baseId, "FavoriteCoffeeController");
        }
Beispiel #2
0
        public void Load(string baseId)
        {
            var state = SaveLoadSystem.Load <FavoriteCoffeeState>(baseId, "FavoriteCoffeeController");

            if (state == null)
            {
                state = new FavoriteCoffeeState();
            }

            favoriteCoffees = state.favoriteCoffees;
            currentIndex    = state.currentIndex;
        }