Esempio n. 1
0
    void HydrateRulePresetPanel()
    {
        HashSet <GameRules> rulesToSet = new HashSet <GameRules>();

        rulesToSet.UnionWith(SaveDataManager.GetDefaultGameRules());
        rulesToSet.UnionWith(SaveDataManager.GetSavedRuleSets());

        foreach (GameRules rules in rulesToSet)
        {
            RulePresetSelector newRulePresetSelector = ObjectPooler.GetObject(RulesPresetSelectorPF, RulesPresetHolder);
            newRulePresetSelector.SetRepresentedRules(rules, this);
            RulePresetSelectors.Add(newRulePresetSelector);
        }
    }