Ejemplo n.º 1
0
 public RSRuleData(bool inbAssignId)
 {
     DefaultInitialize();
     if (inbAssignId)
     {
         Id = ScriptUtils.NewId();
     }
 }
Ejemplo n.º 2
0
        public RSRuleData Clone()
        {
            RSRuleData clone = new RSRuleData();

            clone.Id              = ScriptUtils.NewId();
            clone.Name            = Name;
            clone.RoutineGroup    = RoutineGroup;
            clone.Enabled         = Enabled;
            clone.OnlyOnce        = OnlyOnce;
            clone.TriggerId       = TriggerId;
            clone.Conditions      = CloneUtils.DeepClone(Conditions);
            clone.ConditionSubset = ConditionSubset;
            clone.Actions         = CloneUtils.DeepClone(Actions);
            return(clone);
        }
Ejemplo n.º 3
0
        static private bool CleanUp(RSRuleData ioRule, HashSet <string> ioDiscoveredRules)
        {
            bool bChanged = false;

            if (string.IsNullOrEmpty(ioRule.Id))
            {
                ioRule.Id = ScriptUtils.NewId();
                bChanged  = true;
            }

            while (!ioDiscoveredRules.Add(ioRule.Id))
            {
                UnityEngine.Debug.LogErrorFormat("[TableUtils] Overlapping rule id {0}", ioRule.Id);
                ioRule.Id = ScriptUtils.NewId();
                bChanged  = true;
            }

            return(bChanged);
        }