Пример #1
0
 public virtual void OnBeforeSerialize()
 {
     objectJsonMap.Clear();
     foreach (var kv in ObjectMap)
     {
         objectJsonMap.Add(kv.Key, JsonUtility.ToJson(kv.Value));
     }
 }
Пример #2
0
 public virtual void OnBeforeSerialize()
 {
     actorsJsonMap.Clear();
     foreach (var kv in ActorsMap)
     {
         var stateJson = kv.Value.ToJson();
         actorsJsonMap.Add(kv.Key, stateJson);
     }
 }
Пример #3
0
        /// <summary>
        /// Purges all the custom global state variables and restores the
        /// pre-defined values specified in the service configuration.
        /// </summary>
        public void ResetGlobalVariables()
        {
            globalVariableMap?.Clear();

            foreach (var varData in config.PredefinedVariables)
            {
                if (!IsGlobalVariable(varData.Name))
                {
                    continue;
                }
                SetVariableValue(varData.Name, varData.Value);
            }
        }
Пример #4
0
        public virtual void ResetGlobalVariables()
        {
            globalVariableMap?.Clear();

            foreach (var varData in Configuration.PredefinedVariables)
            {
                if (!CustomVariablesConfiguration.IsGlobalVariable(varData.Name))
                {
                    continue;
                }
                var value = ExpressionEvaluator.Evaluate <string>(varData.Value, e => LogInitializeVarError(varData.Name, varData.Value, e));
                SetVariableValue(varData.Name, value);
            }
        }
Пример #5
0
        public override void ResetService()
        {
            base.ResetService();

            charIdToAvatarPathMap.Clear();
        }