Beispiel #1
0
 public bool TrySetPresetIfValid(DifficultySettings.PresetType preset)
 {
     if (preset == DifficultySettings.PresetType.Custom || preset == DifficultySettings.PresetType._Count)
     {
         return(false);
     }
     if (DifficultySettings.CustomPreset.Equals(DifficultySettings.GetPreset(preset)))
     {
         DifficultySettings.SetActivePresetType(preset);
         return(true);
     }
     return(false);
 }
Beispiel #2
0
    private void SetUsingPreset(DifficultySettings.PresetType preset_type)
    {
        DifficultySettingsPreset preset = DifficultySettings.GetPreset(preset_type);

        this.GetSelectButton("BaseDifficulty").SetSelectedOptionEnumValue <GameDifficulty>(preset.m_BaseDifficulty);
        this.GetSelectButton("NutrientsDepletion").SetSelectedOptionEnumValue <NutrientsDepletion>(preset.m_NutrientsDepletion);
        this.GetSelectButton("Insects").SetSelectedOptionBoolValue(preset.m_Insects);
        this.GetSelectButton("Leeches").SetSelectedOptionBoolValue(preset.m_Leeches);
        this.GetSelectButton("Aquatic").SetSelectedOptionBoolValue(preset.m_Aquatic);
        this.GetSelectButton("PermaDeath").SetSelectedOptionBoolValue(preset.m_PermaDeath);
        this.GetSelectButton("Predators").SetSelectedOptionBoolValue(preset.m_Predators);
        this.GetSelectButton("Sanity").SetSelectedOptionBoolValue(preset.m_Sanity);
        this.GetSelectButton("Snakes").SetSelectedOptionBoolValue(preset.m_Snakes);
        this.GetSelectButton("Tribes").SetSelectedOptionBoolValue(preset.m_Tribes);
        this.GetSelectButton("Energy").SetSelectedOptionBoolValue(preset.m_Energy);
        this.GetSelectButton("HPLoss").SetSelectedOptionBoolValue(preset.m_HPLoss);
    }
Beispiel #3
0
 public static void SetActivePresetType(DifficultySettings.PresetType preset)
 {
     DifficultySettings.Get().m_ActivePresetType = preset;
 }
Beispiel #4
0
 public static DifficultySettingsPreset GetPreset(DifficultySettings.PresetType preset)
 {
     return(DifficultySettings.Get().m_Presets[(int)preset]);
 }