Ejemplo n.º 1
0
        public static void RegisterVariable(Variable variable)
        {
            if (variable && !s_RegisteredVariables.ContainsKey(variable))
            {
                s_RegisteredVariables[variable] = variable.InitialValue;

                VariableAdded evt = Events.VariableAddedEvent;
                evt.Variable = variable;
                EventManager.Broadcast(evt);
            }
        }
Ejemplo n.º 2
0
        public static void Reset()
        {
            var variables = new List <Variable>(s_RegisteredVariables.Keys);

            foreach (var variable in variables)
            {
                s_RegisteredVariables[variable] = variable.InitialValue;

                VariableAdded evt = Events.VariableAddedEvent;
                evt.Variable = variable;
                EventManager.Broadcast(evt);
            }
        }