Esempio n. 1
0
        public static RuleManager GenerateRules(int seed)
        {
            var ruleManager = RuleManager.Instance;

            if (seed == Seed && !_forceRegnerate)
            {
                DebugLog("Rule Manager already initialized with seed {0}. Skipping initialization.", seed);
                return(ruleManager);
            }
            _forceRegnerate = false;
            Seed            = seed;

            CurrentRulesProperty.SetValue(ruleManager, Initialize(seed == int.MinValue ? 0 : seed), null);
            SeedProperty.SetValue(ruleManager, RuleManager.DEFAULT_SEED, null);
            return(ruleManager);
        }
Esempio n. 2
0
 public static void UnloadRuleManager()
 {
     SeedProperty.SetValue(RuleManager.Instance, int.MinValue, null);
     _forceRegnerate = true;
 }