Exemplo n.º 1
0
 public virtual void OnBeforeSerialize()
 {
     objectJsonMap.Clear();
     foreach (var kv in ObjectMap)
     {
         objectJsonMap.Add(kv.Key, JsonUtility.ToJson(kv.Value));
     }
 }
Exemplo n.º 2
0
 public virtual void OnBeforeSerialize()
 {
     actorsJsonMap.Clear();
     foreach (var kv in ActorsMap)
     {
         var stateJson = kv.Value.ToJson();
         actorsJsonMap.Add(kv.Key, stateJson);
     }
 }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 5
0
        public override void ResetService()
        {
            base.ResetService();

            charIdToAvatarPathMap.Clear();
        }