public static void ApplyPersistData(SkinEffectsController controller)
        {
            if (controller == null)
            {
                throw new ArgumentNullException(nameof(controller));
            }

            IDictionary <string, object> stateDict = null;

            var heroine = controller.ChaControl.GetHeroine();

            if (heroine != null)
            {
                _persistentCharaState.TryGetValue(heroine, out stateDict);
            }

            controller.ApplyCharaState(stateDict);
        }
        public static void SavePersistData(SaveData.Heroine heroine, SkinEffectsController controller)
        {
            if (heroine == null)
            {
                throw new ArgumentNullException(nameof(heroine));
            }
            if (controller == null)
            {
                throw new ArgumentNullException(nameof(controller));
            }

            _persistentCharaState.TryGetValue(heroine, out var dict);
            if (dict == null)
            {
                _persistentCharaState[heroine] = dict = new Dictionary <string, object>();
            }

            controller.WriteCharaState(dict);
        }
 internal void OnSceneUnload(SaveData.Heroine heroine, SkinEffectsController controller)
 {
     StartCoroutine(RefreshOnSceneChangeCo(heroine, false));
 }
Exemplo n.º 4
0
 private static bool HasClothingState(SkinEffectsController controller)
 {
     return(!(controller == null || controller.ClothingState == null || controller.ClothingState.All(x => x == 0)));
 }