예제 #1
0
    public void ReverseParameterConsequence(profile_spare_dataFeature profile_spare_data)
    {
        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.HEALTH, Mathf.RoundToInt(-profile_spare_data.profile_spare_healthcare_value));
        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.ECOLOGY, Mathf.RoundToInt(-profile_spare_data.profile_spare_ecology_value));
        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PROSPERITY, Mathf.RoundToInt(-profile_spare_data.profile_spare_prosperity_value));
        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PEACE, Mathf.RoundToInt(-profile_spare_data.profile_spare_peace_value));

        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.HEALTH_DAILY, Mathf.RoundToInt(-profile_spare_data.profile_spare_healthcare_value));
        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.ECOLOGY_DAILY, Mathf.RoundToInt(-profile_spare_data.profile_spare_ecology_value));
        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PROSPERITY_DAILY, Mathf.RoundToInt(-profile_spare_data.profile_spare_prosperity_value));
        SaveManager.instance.GetCurrentPlayerState().ModifyStat(EStat.PEACE_DAILY, Mathf.RoundToInt(-profile_spare_data.profile_spare_peace_value));

        ChaosGlobe.instance.MarkSituationDirty();
    }
예제 #2
0
    private void ApplyConsequence(profile_spare_dataFeature profile_spare_data)
    {
        profile_spare_data.profile_spare_instruction.CallScript();

        for (int i = 0; i < profile_spare_data.profile_spare_disabler.Count; ++i)
        {
            template_profile disabledProfile = profile_spare_data.profile_spare_disabler[i] as template_profile;
            disabledProfile.Template.profile_basic_data.profile_is_enabled = false;
            SaveManager.instance.GetCurrentPlayerState().AddDisabledProfile(disabledProfile.Id);
        }

        for (int i = 0; i < profile_spare_data.profile_spare_enabler.Count; ++i)
        {
            template_profile enabledProfile = profile_spare_data.profile_spare_enabler[i] as template_profile;
            enabledProfile.Template.profile_basic_data.profile_is_enabled = true;
            SaveManager.instance.GetCurrentPlayerState().AddEnabledProfile(enabledProfile.Id);
        }



        Phone.instance.AddNewsText(profile_spare_data.profile_spare_news_first);
        Phone.instance.AddNewsText(profile_spare_data.profile_spare_news_second);
        Phone.instance.AddNewsText(profile_spare_data.profile_spare_news_third);
    }