Esempio n. 1
0
    public void SaveAsNewButton()
    {
        GameRules newRules = CurrentlyWorkshoppedGameRules.CloneRules();

        SaveDataManager.SaveNewRuleSet(newRules);

        RulePresetSelector newRulesPreset = ObjectPooler.GetObject(RulesPresetSelectorPF, RulesPresetHolder);

        RulePresetSelectors.Add(newRulesPreset);
        newRulesPreset.SetRepresentedRules(newRules, this);

        SetRulesFromPreset(newRules);
    }
Esempio n. 2
0
    public void UpdateButton()
    {
        SaveDataManager.UpdateRuleSet(CurrentlyWorkshoppedGameRules);
        CurrentlyWorkshoppedGameRules = CurrentlyWorkshoppedGameRules.CloneRules();
        FutureGameRules = CurrentlyWorkshoppedGameRules.CloneRules();
        UpdateRuleSetButton.interactable = false;

        RulePresetSelector matchingSelector = MatchingSelector(CurrentlyWorkshoppedGameRules);

        if (matchingSelector != null)
        {
            matchingSelector.SetRepresentedRules(CurrentlyWorkshoppedGameRules, this);
        }
    }