using System; using System.Collections; using System.Collections.Generic; using System.IO; using MaidStatus; using UnityEngine; using wf; using Yotogis; public class YotogiPlayManager : WfScreenChildren { public override void Awake() { base.Awake(); this.yotogi_mgr_ = base.GetComponentInParent(); UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(true); UTY.GetChildObject(base.root_obj, "SkillSelectViewer", false).SetActive(true); this.common_buttons_ = UTY.GetChildObject(base.root_obj, "UndressingViewer/CommonPanel", false).GetComponent(); this.command_factory_ = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit", false).GetComponent(); this.command_factory_.SetCommandCreateCallBack(new YotogiCommandFactory.CommandCreateCallBack(this.OnCreateCommand)); this.command_factory_.SetCommandCallback(new YotogiCommandFactory.CommandCallback(this.OnClickCommand)); this.command_factory_.SetCommandEnabledCallBack(new YotogiCommandFactory.CommandEnabledCallBack(this.OnEnabledCommand)); this.command_factory_.SetChangeCommandTextColorCallBack(new YotogiCommandFactory.ChangeCommandTextColorCallBack(this.OnChangeCommandTextColor)); this.command_factory_.SetCommandExecConditionTextsCallback(new YotogiCommandFactory.CommandExecConditionTextsCallback(this.OnMouseCommand)); this.param_scroll_ = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/ParamView", false).GetComponent(); this.camera_move_support_ = base.gameObject.AddComponent(); this.man_alpha_slider_ = UTY.GetChildObject(base.root_obj, "UndressingViewer/UndressingViewer/MaskGroup/PlayerModelTransparency/SliderParent/Slider", false).GetComponent(); this.control_mask_list_.Add(UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/ControlMaskt", false)); this.control_mask_list_.Add(UTY.GetChildObject(base.root_obj, "UndressingViewer/UndressingViewer/ControlMaskt", false)); this.undressing_mgr_ = UTY.GetChildObject(base.root_obj, "UndressingViewer/UndressingViewer/MaskGroup/UndressParent", false).GetComponent(); this.undressing_mgr_.SetCallBackEvent(new UndressingManager.OnClickEventDelegate(this.OnUndressingEvent)); this.btn_excite_lock_ = UTY.GetChildObject(base.root_obj, "StatusSlider/ParameterViewer/MaskGroup/Lock", false).GetComponent(); this.skill_group_parent_ = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/SkillGroup/SkillParent", false); Transform transform = this.skill_group_parent_.transform; for (int i = 0; i < transform.childCount; i++) { GameObject gameObject = transform.GetChild(i).gameObject; GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false); UIButton component = childObject.GetComponent(); component.onClick.Clear(); UISprite component2 = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent(); UILabel componentInChildren = component2.GetComponentInChildren(); UIRect uirect = component2; float alpha = 0f; componentInChildren.alpha = alpha; uirect.alpha = alpha; EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnSkillIconClick)); UIEventTrigger component3 = childObject.GetComponent(); int num = i; EventDelegate.Add(component3.onHoverOver, delegate { this.VisibleSkillName(num, true); }); EventDelegate.Add(component3.onHoverOut, delegate { this.VisibleSkillName(num, false); }); EventDelegate.Add(component3.onDragStart, delegate { this.VisibleSkillName(num, false); }); } this.commandExecConditionsPanel = UTY.GetChildObject(base.root_obj, "ConditionsPanel", false); this.commandExecConditionList = UTY.GetChildObject(this.commandExecConditionsPanel, "ConditionParent", false).GetComponent(); this.commandExecConditionsPanel.SetActive(false); this.playing_skill_no_ = -1; } protected override void OnCall() { GameMain.Instance.MainCamera.FadeInNoUI(0f, true); uGUITutorialPanel.OpenTutorial("YotogiCommand", null, false); GameMain.Instance.SysShortcut.strSceneHelpName = "YotogiCommand"; this.maid_ = this.yotogi_mgr_.maid; this.is_faint_end = false; string systemVers = GameMain.Instance.CMSystem.GetSystemVers("ExciteLock"); this.is_excite_lock_ = (systemVers == "1"); if (this.btn_excite_lock_.isSelected != this.is_excite_lock_) { this.btn_excite_lock_.SetSelect(this.is_excite_lock_); } if (!this.is_free_mode) { this.is_excite_lock_ = false; } GameObject childObject = UTY.GetChildObject(base.root_obj, "StatusViewer", false); GameObject childObject2 = UTY.GetChildObject(base.root_obj, "StatusSlider", false); if (this.command_menu != null) { this.command_menu.SetOnEnterEvetn(new Action(this.OnClickCommand)); } if (!this.is_free_mode && !this.is_vr_mode && this.paramenter_viewer_ == null) { childObject.SetActive(true); childObject2.SetActive(false); this.param_basic_bar_ = UTY.GetChildObject(childObject, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent(); this.paramenter_viewer_ = Utility.CreatePrefab(UTY.GetChildObject(base.root_obj, "ParameterViewer/YotogiParameterViewer/MaskGroup", false), "SceneYotogi/Common/Prefab/ParameterViewer", true).GetComponent(); this.paramenter_viewer_.SetCostumeButtonVisible(false); this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false)); UTY.GetChildObject(base.root_obj, "SkillSelectViewer", false).SetActive(false); } else if (this.is_free_mode) { this.playing_skill_no_ = -1; this.param_basic_bar_ = UTY.GetChildObject(childObject2, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent(); childObject.SetActive(false); childObject2.SetActive(true); UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(false); GameObject childObject3 = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Parent", false); if (childObject3.transform.childCount == 0) { this.yotogi_mgr_.skill_select_prefab_object.transform.SetParent(childObject3.transform, false); } this.free_skill_select_ = childObject3.GetComponentInChildren(); this.common_buttons_.next_btn.gameObject.SetActive(false); UTY.GetChildObject(this.common_buttons_.gameObject, "UnderButtonGroup/End", false).SetActive(true); UIButton component = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Next", false).GetComponent(); component.onClick.Clear(); EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnClickSkillSelectEnd)); this.free_mode_backup_data_.seikeiken = this.maid_.status.seikeiken; } this.param_basic_bar_.SetMaid(this.maid_); this.player_state_ = YotogiPlay.PlayerState.Normal; if (this.estrusMode) { this.estrusMode = false; this.maid_.status.currentSensual = 0; this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false); } if (this.playing_skill_no_ == -1) { this.Initialize(); } GameMain.Instance.ScriptMgr.StopMotionScript(); this.NextSkill(); this.yotogi_mgr_.ResetWorld(); this.lockRepeatVoiceUpdate = false; this.doneFtFileCall = false; base.StartCoroutine(this.CallFtFiles()); this.breatheObjects = new List(); for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++) { Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i); if (!(maid == null)) { maid.AddPrefab("Particle/pToiki", "夜伽_吐息", "Bip01 Head", new Vector3(0.042f, 0.076f, 0f), new Vector3(-90f, 90f, 0f)); this.breatheObjects.Add(maid.GetPrefab("夜伽_吐息")); if (i == 0) { this.loveLiquidObjects = new GameObject[3]; maid.AddPrefab("Particle/pPistonEasy_cm3D2", "夜伽_愛液1", "_IK_vagina", new Vector3(0f, 0f, 0.01f), new Vector3(0f, -180f, 90f)); maid.AddPrefab("Particle/pPistonNormal_cm3D2", "夜伽_愛液2", "_IK_vagina", new Vector3(0f, 0f, 0.01f), new Vector3(0f, -180f, 90f)); maid.AddPrefab("Particle/pPistonHard_cm3D2", "夜伽_愛液3", "_IK_vagina", new Vector3(0f, 0f, 0.01f), new Vector3(0f, -180f, 90f)); this.loveLiquidObjects[0] = maid.GetPrefab("夜伽_愛液1"); this.loveLiquidObjects[1] = maid.GetPrefab("夜伽_愛液2"); this.loveLiquidObjects[2] = maid.GetPrefab("夜伽_愛液3"); } } } this.particleBreathe = false; this.particleLoveLiquidType = 0; } private void Initialize() { this.estrusMode = false; this.yotogi_mgr_.acquired_propensityid_list.Clear(); this.ClearVoice(); this.common_buttons_.viwe_reset_btn.onClick.Clear(); EventDelegate.Add(this.common_buttons_.viwe_reset_btn.onClick, new EventDelegate.Callback(this.OnClickViweReset)); this.script_mgr_ = GameMain.Instance.ScriptMgr; this.script_mgr_.EvalScript("global.__skill_command_file = new Array();"); this.common_buttons_.next_btn.onClick.Clear(); EventDelegate.Add(this.common_buttons_.next_btn.onClick, new EventDelegate.Callback(this.OnClickNext)); UIButton component = UTY.GetChildObject(this.common_buttons_.gameObject, "UnderButtonGroup/End", false).GetComponent(); component.onClick.Clear(); EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnClickNext)); this.maid_status_ = this.maid_.status; this.bonusCorrectionStatus_ = this.maid_status_.GetBonusStatusAsFeatureAndPropensitys(); if (!this.is_free_mode) { this.maid_.status.currentSensual = 0; int num = this.maid_.status.inyoku + this.maid_.status.housi + this.maid_.status.hentai + this.maid_.status.mvalue; this.maid_.status.currentExcite = num / 2000 * 10; } else { this.maid_.status.currentSensual = 300; } this.maid_.status.currentMind = this.maid_status_.maxMind; this.param_basic_bar_.SetMaxMind(this.maid_status_.maxMind); this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false); this.man_alpha_slider_.value = (float)GameMain.Instance.CMSystem.ManAlpha / 100f; this.setting_man_alpha_ = GameMain.Instance.CMSystem.ManAlpha; this.man_alpha_slider_.onChange.Clear(); EventDelegate.Add(this.man_alpha_slider_.onChange, new EventDelegate.Callback(this.ChangeSliderValue)); this.undressing_mgr_.SetMaid(this.maid_, null); this.undressing_mgr_.SetMaskMode(UndressingManager.UnitType.全着衣, UndressingManager.MaskStatus.On); } private IEnumerator CallFtFiles() { while (this.yotogi_mgr_.IsAllCharaBusy()) { yield return null; } for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++) { Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i); if (maid != null && maid.Visible) { maid.AllProcPropSeqStart(); } } GameMain.Instance.CharacterMgr.DeactivateManAll(); foreach (KeyValuePair keyValuePair in this.playing_skill_.skill_pair.base_data.man_setting) { Maid maid2 = GameMain.Instance.CharacterMgr.CharaVisible(keyValuePair.Key, true, true); if (!string.IsNullOrEmpty(keyValuePair.Value)) { CharacterMgr.npcDatas[keyValuePair.Value].Apply(maid2, true); } maid2.body0.SetChinkoVisible(true); maid2.AllProcPropSeqStart(); } while (this.yotogi_mgr_.IsAllCharaBusy()) { yield return null; } this.script_mgr_.is_motion_blend = true; CharacterMgr chara_mgr = GameMain.Instance.CharacterMgr; if (this.skill_pair_.base_data != null && this.skill_pair_.base_data.start_call_file != string.Empty) { string str = this.CallNormalFile(this.skill_pair_.base_data.start_call_file, string.Empty); this.yotogi_mgr_.AddDebugLog("FTファイル[" + str + "]を呼び出しました"); } this.camera_move_support_.SaveCameraPosition(); if (this.skill_pair_.base_data != null && this.skill_pair_.base_data.start_call_file2 != string.Empty) { string text = string.Empty; string text2 = string.Empty; if (0 <= this.maid_status_.currentExcite && this.maid_status_.currentExcite <= 200) { if (this.playing_skill_level_ == 3) { text = "*KA1"; } else { text = "*KA0"; } text2 = this.CallNormalFile(this.skill_pair_.base_data.start_call_file2, text); this.yotogi_mgr_.AddDebugLog(string.Concat(new string[] { "性格FTファイルKA[", text2, "][", text, "]を呼び出しました" })); } else { text = "*KA2"; text2 = this.CallNormalFile(this.skill_pair_.base_data.start_call_file2, text); this.yotogi_mgr_.AddDebugLog(string.Concat(new string[] { "性格FTファイルKA[", text2, "][", text, "]を呼び出しました" })); } text = "*" + YotogiPlay.GetRRType(this.maid_.status.currentExcite).ToString(); text2 = this.CallNormalFile(this.skill_pair_.base_data.start_call_file2, text); this.yotogi_mgr_.AddDebugLog("性格FTファイル[" + text2 + "]を呼び出しました"); } while (this.yotogi_mgr_.yotogi_kag.kag.GetCurrentLabel() != "*finish") { yield return null; } this.doneFtFileCall = true; yield break; } protected override bool IsCallFadeIn() { return this.doneFtFileCall; } public override void Update() { base.Update(); if (GameMain.Instance.CMSystem.ManAlpha != this.setting_man_alpha_) { this.man_alpha_slider_.value = (float)GameMain.Instance.CMSystem.ManAlpha / 100f; this.setting_man_alpha_ = GameMain.Instance.CMSystem.ManAlpha; } if (base.fade_status != WfScreenChildren.FadeStatus.Wait) { return; } if (0 < this.control_mask_tick_count && this.control_mask_tick_count <= GameMain.tick_count) { this.SetControlMask(false, false); } if (!this.lockRepeatVoiceUpdate) { for (int i = 0; i < this.repeat_voice_data_list_.Count; i++) { YotogiPlayManager.RepeatVoiceData repeatVoiceData = this.repeat_voice_data_list_[i]; if (!string.IsNullOrEmpty(repeatVoiceData.repeat_voice_file)) { Maid maid; if (0 < repeatVoiceData.maid_no) { maid = GameMain.Instance.CharacterMgr.GetMaid(repeatVoiceData.maid_no); } else { maid = this.maid_; } if (!maid.AudioMan.isPlay()) { repeatVoiceData.elapsed_time += (int)(Time.deltaTime * 1000f); if (this.kRepeatWaitTime <= repeatVoiceData.elapsed_time) { repeatVoiceData.elapsed_time = 0; if (maid != null && maid.AudioMan != null) { maid.AudioMan.LoadPlay(repeatVoiceData.repeat_voice_file, 0f, false, true); } } } } } } if (this.is_faint_end && !GameMain.Instance.MainCamera.IsFadeProcNoUI() && GameMain.Instance.SysDlg.IsDecided) { bool flag = this.playing_skill_ != null && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint; if (!flag) { this.CallNormalFile("?_YOTOGI_SYSTEM_KIZETU.ks", string.Empty); GameMain.Instance.MainCamera.FadeOutNoUI(base.fade_time, true); } if (this.playing_skill_.skill_pair.base_data.connect_faint_skill != null) { GameMain.Instance.SysDlg.Show("気絶しました。\n気絶したメイドを責めますか?", SystemDialog.TYPE.YES_NO, delegate { GameMain.Instance.SysDlg.Close(); this.yotogi_mgr_.AddPlaySkill(this.playing_skill_.skill_pair.base_data.connect_faint_skill); this.playing_skill_no_ = this.yotogi_mgr_.play_skill_array.Length - 2; this.maid_status_.currentMind = this.maid_status_.maxMind; this.Finish(); }, delegate { GameMain.Instance.SysDlg.Close(); this.playing_skill_no_ = -1; this.Finish(); }); } else if (flag) { this.playing_skill_no_ = -1; this.Finish(); } else { GameMain.Instance.SysDlg.Show("気絶しました。\n夜伽を終了します。", SystemDialog.TYPE.OK, delegate { GameMain.Instance.SysDlg.Close(); this.playing_skill_no_ = -1; this.Finish(); }, null); } this.is_faint_end = false; } } public bool NextSkill() { int num = (!YotogiStageSelectManager.SelectedStageRefDayTime) ? 1 : 0; string text = YotogiStageSelectManager.SelectedStage.prefabName[num]; if (0 <= text.IndexOf("?")) { text = ScriptManager.ReplacePersonal(this.maid_, text); } GameMain.Instance.BgMgr.ChangeBg(text); this.ClearVoice(); this.SetRepeatVoiceFile(string.Empty, 0); this.SetControlMask(false, false); this.play_command_id_.Clear(); this.playing_skill_no_++; if (this.maid_status_.currentMind <= 0) { this.maid_status_.currentMind = this.maid_status_.maxMind / 2; } else { this.maid_status_.currentMind = this.maid_status_.maxMind; } this.param_basic_bar_.SetCurrentExcite(this.maid_status_.currentExcite, false); this.param_basic_bar_.SetCurrentMind(this.maid_status_.currentMind, false); this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false); if (this.paramenter_viewer_ != null && this.paramenter_viewer_.gameObject.activeSelf) { this.paramenter_viewer_.SetMaid(this.maid_); this.paramenter_viewer_.UpdateTextCommon(); this.paramenter_viewer_.UpdateTextParam(); } this.param_scroll_.Init(); if (this.yotogi_mgr_.play_skill_array[this.playing_skill_no_].skill_pair.base_data == null) { return false; } this.UpdateSkillTower(); this.playing_skill_ = this.yotogi_mgr_.play_skill_array[this.playing_skill_no_]; this.skill_pair_ = this.playing_skill_.skill_pair; if (this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint) { this.SetSkillTowerButtonEnabled(false); } CharacterMgr characterMgr = GameMain.Instance.CharacterMgr; for (int i = 1; i < characterMgr.GetMaidCount(); i++) { Maid maid = characterMgr.GetMaid(i); if (maid != null && maid.Visible) { maid.OpenMouth(false); maid.Visible = false; } } List list = new List(); if (this.playing_skill_.skill_pair.base_data != null && 1 < this.playing_skill_.skill_pair.base_data.player_num) { for (int j = 1; j < this.playing_skill_.skill_pair.base_data.player_num; j++) { Maid maid2 = characterMgr.GetMaid(j); if (maid2 != null) { maid2.OpenMouth(false); maid2.Visible = true; list.Add(maid2); } } } this.undressing_mgr_.SetMaid(this.maid_, list.ToArray()); if (!this.maid_.Visible) { this.maid_.Visible = true; } this.replace_personal_target_maid_array_ = new Maid[1 + list.Count]; this.replace_personal_target_maid_array_[0] = this.maid_; for (int k = 0; k < list.Count; k++) { this.replace_personal_target_maid_array_[k + 1] = list[k]; } this.playing_skill_.is_play = true; if (this.command_menu != null) { this.command_menu.ReserveSkillCommand(this.skill_pair_.base_data.command); this.command_menu.visible = true; } this.command_factory_.ReserveSkillCommand(this.skill_pair_.base_data.command); this.valid_command_dic_.Clear(); Skill.Data.Command.Data[] data = this.skill_pair_.base_data.command.data; if (this.skill_pair_.skill_data == null) { this.playing_skill_level_ = ((this.yotogi_mgr_.fix_skill_level != 0) ? this.yotogi_mgr_.fix_skill_level : 3); } else { this.playing_skill_level_ = ((this.yotogi_mgr_.fix_skill_level != 0) ? this.yotogi_mgr_.fix_skill_level : this.skill_pair_.skill_data.level); } for (int l = 0; l < data.Length; l++) { this.valid_command_dic_.Add(data[l]); } this.UpdateCommand(); this.yotogi_mgr_.AddDebugLog(string.Concat(new string[] { "スキル[", this.skill_pair_.base_data.name, " Lv.", this.playing_skill_level_.ToString(), "]を開始開始しました" })); return true; } public string CallNormalFile(string file, string label) { string text = ScriptManager.ReplacePersonal(this.replace_personal_target_maid_array_, file); GameMain.Instance.ScriptMgr.EvalScript("global.__skill_first_file = '" + text + "';"); if (label == null) { label = string.Empty; } GameMain.Instance.ScriptMgr.EvalScript("global.__skill_first_file_label = '" + label + "';"); GameMain.Instance.ScriptMgr.LoadYotogiScript("yotogi_skill_call_main.ks", string.Empty); return text; } public void ApplyExecCommandStatus(Maid maid, Skill.Data.Command.Data cm) { Skill.Data.Command.Data.Status status = cm.status; bool enabledYotogiStatusLock = this.maid_.status.enabledYotogiStatusLock; Status maid_status = maid.status; BonusStatus bonusStatus = this.bonusCorrectionStatus_; Func feiling_func = (float ceiling_num) => (0f > ceiling_num) ? ((int)System.Math.Floor((double)ceiling_num)) : ((int)System.Math.Ceiling((double)ceiling_num)); Func func = delegate(int calc_a_command_num, int calc_a_correction_num) { float num4 = ((float)calc_a_command_num * (100f + (float)calc_a_correction_num) + (float)((this.playing_skill_level_ - 1) * 10)) / 100f; int num5 = maid_status.studyRate / 10; float num6 = 100f - (float)((100 - num5) / 10 * 5); num4 *= num6 * 0.01f; return feiling_func(num4); }; Func func2 = delegate(int calc_b_command_num, int calc_a_correction_num) { float arg = (float)calc_b_command_num * (100f + (float)calc_a_correction_num) / 100f; return feiling_func(arg); }; Func func3 = (int calc_a_command_num, int calc_a_correction_num) => calc_a_command_num; int num = (!this.is_excite_lock_) ? func2(status.excitement, bonusStatus.excite) : 0; if (cm.status.bonusExcitementUpLine <= this.maid_.status.currentExcite || cm.status.bonusExcitementDownLine > this.maid_.status.currentExcite) { num = (int)Mathf.Floor((float)num * 1.2f); } maid_status.currentExcite += num; if (this.is_free_mode || this.is_vr_mode) { return; } if (!enabledYotogiStatusLock) { maid_status.baseLovely += func3(status.lovely, bonusStatus.lovely); maid_status.baseElegance += func3(status.elegance, bonusStatus.elegance); maid_status.baseCharm += func3(status.charm, bonusStatus.charm); } if (!this.estrusMode) { maid_status.currentMind += func(status.mind, bonusStatus.mind); maid_status.currentSensual += func(status.sensual, bonusStatus.sensual); } else { maid_status.currentSensual += func(status.cost_sensual, bonusStatus.sensual); } if (!enabledYotogiStatusLock) { maid_status.baseInyoku += func(status.inyoku, bonusStatus.inyoku); maid_status.baseMvalue += func(status.m_value, bonusStatus.mvalue); maid_status.baseHentai += func(status.hentai, bonusStatus.hentai); maid_status.baseHousi += func(status.housi, bonusStatus.housi); maid_status.baseReception += func(status.reception, bonusStatus.reception); maid_status.baseTeachRate += func(status.teach_rate, bonusStatus.teachRate); } int num2 = this.maid_.status.inyoku + this.maid_.status.housi + this.maid_.status.hentai + this.maid_.status.mvalue; int num3 = num2 / 2000 * 2; if (!this.playing_skill_.skill_pair.lock_skill_exp) { this.playing_skill_.exp += status.skill_exp + num3; } } public void SetRepeatVoiceFile(string file_name, int maid_no) { this.repeat_voice_data_list_.Clear(); this.AddRepeatVoiceFile(file_name, maid_no); } public void AddRepeatVoiceFile(string file_name, int maid_no) { YotogiPlayManager.RepeatVoiceData repeatVoiceData = new YotogiPlayManager.RepeatVoiceData(); repeatVoiceData.repeat_voice_file = file_name; repeatVoiceData.maid_no = maid_no; repeatVoiceData.elapsed_time = this.kRepeatWaitTime; this.repeat_voice_data_list_.Add(repeatVoiceData); } public void ClearRepeatVoiceData() { this.repeat_voice_data_list_.Clear(); } public void ClearVoice() { GameMain.Instance.SoundMgr.VoiceStopAll(); foreach (YotogiPlayManager.RepeatVoiceData repeatVoiceData in this.repeat_voice_data_list_) { repeatVoiceData.elapsed_time = 0; } } private void OnClickCommand(Skill.Data.Command.Data command_data) { if (this.yotogi_mgr_.IsAllCharaBusy()) { this.yotogi_mgr_.AddDebugLog("============================================"); this.yotogi_mgr_.AddDebugLog("×コマンド[" + command_data.basic.name + "]が押されました"); this.yotogi_mgr_.AddDebugLog("IsBusy状態なのでキャンセルしました"); this.yotogi_mgr_.AddDebugLog("============================================"); return; } this.yotogi_mgr_.AddDebugLog("============================================"); this.yotogi_mgr_.AddDebugLog("■コマンド[" + command_data.basic.name + "]が押されました"); this.play_command_id_.Add(command_data.basic.id); this.backup_maid_param_ = YotogiPlay.Param.Create(this.maid_); this.ApplyExecCommandStatus(this.maid_, command_data); if (this.paramenter_viewer_ != null && this.paramenter_viewer_.gameObject.activeSelf) { this.paramenter_viewer_.UpdateTextParam(); } if (!this.is_free_mode && this.playing_skill_.skill_pair.base_data.command.commandCoundId == command_data.basic.id) { this.playing_skill_.skill_pair.skill_data.commandCount++; } if (command_data.basic.isEstrusTriggerCommand) { this.estrusMode = true; } this.particleBreathe = !command_data.basic.isStopParticleBreathe; if (command_data.basic.isStopParticleLoveLiquid) { this.particleLoveLiquidType = 0; } else { if ((command_data.basic.command_type == Yotogi.SkillCommandType.挿入 || command_data.basic.command_type == Yotogi.SkillCommandType.継続) && this.player_state_ != YotogiPlay.PlayerState.Insert) { foreach (GameObject gameObject in this.loveLiquidObjects) { gameObject.GetComponent().main.startDelay = 2.5f; } } else if (this.particleLoveLiquidType == 0) { foreach (GameObject gameObject2 in this.loveLiquidObjects) { gameObject2.GetComponent().main.startDelay = 0f; } } this.particleLoveLiquidType = ((200 > this.maid_.status.currentExcite) ? ((100 > this.maid_.status.currentExcite) ? 1 : 2) : 3); } this.param_basic_bar_.SetCurrentMind(this.maid_status_.currentMind, true); this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, true); this.param_basic_bar_.SetCurrentExcite(this.maid_status_.currentExcite, true); YotogiPlay.Param param = YotogiPlay.Param.Create(this.maid_) - this.backup_maid_param_; Action>, string, int> action = delegate(List> list, string name, int num) { if (num == 0) { return; } list.Add(new KeyValuePair(name, num)); }; List> list2 = new List>(); action(list2, "興奮", param.currentExcite); action(list2, "精神", param.currentMind); action(list2, "官能", param.cur_sensory); action(list2, "淫欲", param.inyoku); action(list2, "M性", param.m_value); action(list2, "変態", param.hentai); action(list2, "奉仕", param.housi); action(list2, "可憐", param.lovely); action(list2, "気品", param.elegance); action(list2, "魅惑", param.charm); action(list2, "接待", param.reception); action(list2, "指導", param.teach_rate / 10); this.param_scroll_.CallFadeIn(list2); this.ClearCommandFile(); Maid maid = this.maid_; if (0 < command_data.basic.ref_maid_no) { Maid maid2 = GameMain.Instance.CharacterMgr.GetMaid(command_data.basic.ref_maid_no); if (maid2 != null) { maid = maid2; } int num3 = -1; for (int k = 1; k < this.replace_personal_target_maid_array_.Length; k++) { if (this.replace_personal_target_maid_array_[k] == maid) { num3 = k; break; } } if (0 < num3) { this.replace_personal_target_maid_array_[0] = maid; this.replace_personal_target_maid_array_[num3] = this.maid_; } } this.lockRepeatVoiceUpdate = false; Yotogi.SkillCommandType command_type = command_data.basic.command_type; if (command_data.basic.isAcquisitionPropensityCommand) { this.yotogi_mgr_.AddDebugLog("プレイ 性癖-覚醒"); this.SetControlMask(true, false); int id = command_data.basic.learning_propensity.id; if (!this.is_free_mode && !this.yotogi_mgr_.acquired_propensityid_list.Contains(id)) { this.yotogi_mgr_.acquired_propensityid_list.Add(id); } this.CallCommandFile(command_data.basic.call_file.propensity_arousal_file, string.Empty, true); this.PlayRRFile(command_data); } else if (command_type == Yotogi.SkillCommandType.挿入 || command_type == Yotogi.SkillCommandType.継続) { if (this.skill_pair_.base_data.specialConditionType == Skill.Data.SpecialConditionType.Drunk) { this.PlayDrunkContinue(command_data, maid, true); } else { this.PlayNormalContinue(command_data, maid, true); } this.PlayRRFile(command_data); } else if (command_type == Yotogi.SkillCommandType.単発 || command_type == Yotogi.SkillCommandType.単発_挿入) { bool flag = false; if (command_data.basic.isPropensityCommand) { flag = this.maid_.status.propensitys.ContainsKey(command_data.basic.learning_propensity.id); } if (this.skill_pair_.base_data.specialConditionType == Skill.Data.SpecialConditionType.Drunk) { this.PlayDrunkSingle(command_data, maid, true); } else if (flag) { this.PlayProclivitySingle(command_data, true); } else { this.PlayNormalSingle(command_data, maid, true); } this.PlayRRFile(command_data); } else if (command_type == Yotogi.SkillCommandType.絶頂) { this.PlayNormalClimax(command_data, false); } else if (command_type == Yotogi.SkillCommandType.止める) { this.PlayNormalStop(command_data, true); this.PlayRRFile(command_data); } if (command_type == Yotogi.SkillCommandType.挿入 || command_type == Yotogi.SkillCommandType.単発_挿入) { this.player_state_ = YotogiPlay.PlayerState.Insert; } else if (command_type == Yotogi.SkillCommandType.止める) { this.player_state_ = YotogiPlay.PlayerState.Normal; } else if (command_type == Yotogi.SkillCommandType.絶頂) { this.player_state_ = YotogiPlay.PlayerState.Normal; } this.UpdateCommand(); this.yotogi_mgr_.AddDebugLog("============================================"); if (0 < command_data.basic.ref_maid_no && maid != this.maid_) { int num2 = -1; for (int l = 1; l < this.replace_personal_target_maid_array_.Length; l++) { if (this.replace_personal_target_maid_array_[l] == this.maid_) { num2 = l; break; } } if (0 < num2) { this.replace_personal_target_maid_array_[0] = this.maid_; this.replace_personal_target_maid_array_[num2] = maid; } } } private void PlayRRFile(Skill.Data.Command.Data command_data) { Yotogi.RRType rrtype = YotogiPlay.GetRRType(this.maid_.status.currentExcite); string text = (!this.estrusMode) ? "*" : "*発情"; text += rrtype.ToString(); this.CallCommandFile(command_data.basic.call_file.rr, text, false); } private void PlayNormalContinue(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate) { this.yotogi_mgr_.AddDebugLog("プレイ 通常-挿入,継続系"); if (this.player_state_ != YotogiPlay.PlayerState.Insert) { this.PlayInsert(command_data, lockRRUpdate); } Relation relation = target_maid.status.relation; string text = string.Empty; string text2 = string.Empty; Yotogi.RCType rctype = YotogiPlay.GetRCType(this.backup_maid_param_.currentExcite, this.maid_.status.currentExcite); if (rctype != Yotogi.RCType.RCNull) { string str = rctype.ToString(); this.yotogi_mgr_.AddDebugLog("RC HIT!! " + str); text = command_data.basic.call_file.rc; if (this.estrusMode) { text2 = ((this.playing_skill_level_ != 3) ? "*初々しい発情" : "*慣れ発情"); text2 += str; } else if (this.playing_skill_level_ == 3) { if (relation == Relation.Lover) { text2 = "*慣れ恋人" + str; } else { text2 = "*緊張orお近づきor信頼" + str; } } else if (this.playing_skill_level_ == 2 || relation == Relation.Trust) { text2 = "*フラット、変化進行" + str; } else if (relation != Relation.Contact) { if (relation == Relation.Lover) { text2 = "*初々しい恋人" + str; } } else { text2 = "*初々しいお近づき" + str; } } else { this.PlayInsert2(command_data, lockRRUpdate); Yotogi.RRCType rrctype = YotogiPlay.GetRRCType(this.backup_maid_param_.currentExcite, this.maid_.status.currentExcite); HashSet hashSet = new HashSet(); if (this.estrusMode) { hashSet.Add(Yotogi.RRCType.RRC1); hashSet.Add(Yotogi.RRCType.RRC3); hashSet.Add(Yotogi.RRCType.RRC4); hashSet.Add(Yotogi.RRCType.RRC6); } if (rrctype == Yotogi.RRCType.RRC9 && this.estrusMode && this.maid_.status.currentExcite < 300) { rrctype = Yotogi.RRCType.RRCNull; } if (rrctype != Yotogi.RRCType.RRCNull && (!this.estrusMode || !hashSet.Contains(rrctype))) { if (this.estrusMode) { Dictionary dictionary = new Dictionary(); dictionary.Add(Yotogi.RRCType.RRC2, Yotogi.RRCType.RRC1); dictionary.Add(Yotogi.RRCType.RRC5, Yotogi.RRCType.RRC2); dictionary.Add(Yotogi.RRCType.RRC7, Yotogi.RRCType.RRC3); dictionary.Add(Yotogi.RRCType.RRC8, Yotogi.RRCType.RRC4); dictionary.Add(Yotogi.RRCType.RRC9, Yotogi.RRCType.RRC5); if (dictionary.ContainsKey(rrctype)) { rrctype = dictionary[rrctype]; } } string str2 = rrctype.ToString(); if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2 || rrctype == Yotogi.RRCType.RRC_1 || rrctype == Yotogi.RRCType.RRC_2) { text2 = "*初々しい"; } else if (this.playing_skill_level_ == 3) { text2 = "*慣れ"; } if (this.estrusMode) { text2 += "発情"; } text2 += str2; if (!string.IsNullOrEmpty(text2)) { text = command_data.basic.call_file.rrc; } } } if (text != string.Empty) { this.CallCommandFile(text, text2, lockRRUpdate); } } private void PlayNormalClimax(Skill.Data.Command.Data command_data, bool lockRRUpdate) { this.yotogi_mgr_.AddDebugLog("プレイ 通常-絶頂系"); Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.maid_.status.currentExcite); string file = command_data.basic.call_file.normal; string text = string.Empty; if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2) { text = ((this.backup_maid_param_.currentExcite >= 200) ? "*SYA2" : "*SYA1"); } else { text = ((this.backup_maid_param_.currentExcite >= 200) ? "*SYA4" : "*SYA3"); } if (this.estrusMode) { text = text.Replace("*", "*発情"); } this.CallCommandFile(file, text, lockRRUpdate); file = command_data.basic.call_file.rr; if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2) { if (excitementStatus == Yotogi.ExcitementStatus.Minus || excitementStatus == Yotogi.ExcitementStatus.Small) { text = "*ZIG1"; } else if (excitementStatus == Yotogi.ExcitementStatus.Medium) { text = "*ZIG2"; } else if (excitementStatus == Yotogi.ExcitementStatus.Large) { text = "*ZIG3"; } } else if (excitementStatus == Yotogi.ExcitementStatus.Minus || excitementStatus == Yotogi.ExcitementStatus.Small) { text = "*ZIG4"; } else if (excitementStatus == Yotogi.ExcitementStatus.Medium) { text = "*ZIG5"; } else if (excitementStatus == Yotogi.ExcitementStatus.Large) { text = "*ZIG6"; } if (this.estrusMode) { text = text.Replace("*", "*発情"); } this.CallCommandFile(file, text, lockRRUpdate); } private void PlayNormalStop(Skill.Data.Command.Data command_data, bool lockRRUpdate) { this.yotogi_mgr_.AddDebugLog("プレイ 通常-止める系"); Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.maid_.status.currentExcite); string normal = command_data.basic.call_file.normal; string text = string.Empty; switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: text = "*YAM1"; break; case Yotogi.ExcitementStatus.Small: text = "*YAM2"; break; case Yotogi.ExcitementStatus.Medium: text = "*YAM3"; break; case Yotogi.ExcitementStatus.Large: text = "*YAM4"; break; } if (this.estrusMode) { text = text.Replace("*", "*発情"); } this.CallCommandFile(normal, text, lockRRUpdate); } private void PlayNormalSingle(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate) { this.yotogi_mgr_.AddDebugLog("プレイ 通常-単発系"); Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite); string normal = command_data.basic.call_file.normal; string label = string.Empty; Relation relation = target_maid.status.relation; if (this.estrusMode) { if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2) { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*発情SA1"; break; case Yotogi.ExcitementStatus.Small: label = "*発情SA2"; break; case Yotogi.ExcitementStatus.Medium: label = "*発情SA3"; break; case Yotogi.ExcitementStatus.Large: label = "*発情SA4"; break; } } else { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*発情SA5"; break; case Yotogi.ExcitementStatus.Small: label = "*発情SA6"; break; case Yotogi.ExcitementStatus.Medium: label = "*発情SA7"; break; case Yotogi.ExcitementStatus.Large: label = "*発情SA8"; break; } } } else if (this.playing_skill_level_ == 1 || this.playing_skill_level_ == 2) { if (relation == Relation.Lover) { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*SA5"; break; case Yotogi.ExcitementStatus.Small: label = "*SA6"; break; case Yotogi.ExcitementStatus.Medium: label = "*SA7"; break; case Yotogi.ExcitementStatus.Large: label = "*SA8"; break; } } else if (this.playing_skill_level_ == 2 || relation == Relation.Trust) { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*SA9"; break; case Yotogi.ExcitementStatus.Small: label = "*SA10"; break; case Yotogi.ExcitementStatus.Medium: label = "*SA11"; break; case Yotogi.ExcitementStatus.Large: label = "*SA12"; break; } } else { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*SA1"; break; case Yotogi.ExcitementStatus.Small: label = "*SA2"; break; case Yotogi.ExcitementStatus.Medium: label = "*SA3"; break; case Yotogi.ExcitementStatus.Large: label = "*SA4"; break; } } } else if (this.playing_skill_level_ == 3) { if (relation == Relation.Lover) { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*SA17"; break; case Yotogi.ExcitementStatus.Small: label = "*SA18"; break; case Yotogi.ExcitementStatus.Medium: label = "*SA19"; break; case Yotogi.ExcitementStatus.Large: label = "*SA20"; break; } } else { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*SA13"; break; case Yotogi.ExcitementStatus.Small: label = "*SA14"; break; case Yotogi.ExcitementStatus.Medium: label = "*SA15"; break; case Yotogi.ExcitementStatus.Large: label = "*SA16"; break; } } } this.CallCommandFile(normal, label, lockRRUpdate); } private void PlayInsert(Skill.Data.Command.Data command_data, bool lockRRUpdate) { string normal = command_data.basic.call_file.normal; string text = string.Empty; this.yotogi_mgr_.AddDebugLog(" 挿入中ではないのでファイルコール"); switch (YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite)) { case Yotogi.ExcitementStatus.Minus: text = "*SOU1"; break; case Yotogi.ExcitementStatus.Small: text = "*SOU2"; break; case Yotogi.ExcitementStatus.Medium: text = "*SOU3"; break; case Yotogi.ExcitementStatus.Large: text = "*SOU4"; break; } if (this.estrusMode) { text = text.Replace("*", "*発情"); } this.CallCommandFile(normal, text, lockRRUpdate); } private void PlayInsert2(Skill.Data.Command.Data command_data, bool lockRRUpdate) { string insert = command_data.basic.call_file.insert; string text = string.Empty; this.yotogi_mgr_.AddDebugLog(" 挿入中のファイルコール"); Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite); if (this.estrusMode) { text = "*発情"; } else { text = "*"; } switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: text += "SOC1"; break; case Yotogi.ExcitementStatus.Small: text += "SOC2"; break; case Yotogi.ExcitementStatus.Medium: text += "SOC3"; break; case Yotogi.ExcitementStatus.Large: text += "SOC4"; break; } this.ClearRepeatVoiceData(); GameMain.Instance.SoundMgr.VoiceStopAll(); this.CallCommandFile(insert, text, lockRRUpdate); } private void PlayDrunkContinue(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate) { this.yotogi_mgr_.AddDebugLog("プレイ 酔い-挿入,継続系"); if (this.player_state_ != YotogiPlay.PlayerState.Insert) { this.PlayInsert(command_data, lockRRUpdate); } Relation relation = target_maid.status.relation; string text = string.Empty; string label = string.Empty; Yotogi.RCType rctype = YotogiPlay.GetRCType(this.backup_maid_param_.currentExcite, this.maid_.status.currentExcite); if (rctype != Yotogi.RCType.RCNull) { string str = rctype.ToString(); this.yotogi_mgr_.AddDebugLog("RC HIT!! " + str); text = command_data.basic.call_file.rc; if (relation != Relation.Contact) { if (relation != Relation.Trust) { if (relation == Relation.Lover) { label = "*酔い恋人" + str; } } else { label = "*酔い信頼" + str; } } else { label = "*酔いお近づき" + str; } } else { this.PlayInsert2(command_data, lockRRUpdate); } if (text != string.Empty) { this.CallCommandFile(text, label, lockRRUpdate); } } private void PlayDrunkSingle(Skill.Data.Command.Data command_data, Maid target_maid, bool lockRRUpdate) { this.yotogi_mgr_.AddDebugLog("プレイ 酔い-単発系"); Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite); Relation relation = target_maid.status.relation; string normal = command_data.basic.call_file.normal; string label = string.Empty; if (relation == Relation.Contact) { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*酔いSA1"; break; case Yotogi.ExcitementStatus.Small: label = "*酔いSA2"; break; case Yotogi.ExcitementStatus.Medium: label = "*酔いSA3"; break; case Yotogi.ExcitementStatus.Large: label = "*酔いSA4"; break; } } else if (relation == Relation.Trust) { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*酔いSA5"; break; case Yotogi.ExcitementStatus.Small: label = "*酔いSA6"; break; case Yotogi.ExcitementStatus.Medium: label = "*酔いSA7"; break; case Yotogi.ExcitementStatus.Large: label = "*酔いSA8"; break; } } else if (relation == Relation.Lover) { switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*酔いSA9"; break; case Yotogi.ExcitementStatus.Small: label = "*酔いSA10"; break; case Yotogi.ExcitementStatus.Medium: label = "*酔いSA11"; break; case Yotogi.ExcitementStatus.Large: label = "*酔いSA12"; break; } } this.CallCommandFile(normal, label, lockRRUpdate); } private void PlayProclivitySingle(Skill.Data.Command.Data command_data, bool lockRRUpdate) { this.yotogi_mgr_.AddDebugLog("プレイ 性癖-単発系"); Yotogi.ExcitementStatus excitementStatus = YotogiPlay.GetExcitementStatus(this.backup_maid_param_.currentExcite); string normal = command_data.basic.call_file.normal; string label = string.Empty; switch (excitementStatus) { case Yotogi.ExcitementStatus.Minus: label = "*性癖SA1"; break; case Yotogi.ExcitementStatus.Small: label = "*性癖SA2"; break; case Yotogi.ExcitementStatus.Medium: label = "*性癖SA3"; break; case Yotogi.ExcitementStatus.Large: label = "*性癖SA4"; break; } this.CallCommandFile(normal, label, lockRRUpdate); } private bool OnCreateCommand(Skill.Data.Command.Data command_data) { return command_data.basic.ng_propensity == null || !this.maid_status_.propensitys.ContainsKey(command_data.basic.ng_propensity.id); } private bool OnEnabledCommand(Skill.Data.Command.Data command_data) { Func func = delegate { if (command_data.basic.isEstrusTriggerCommand && (200 > this.maid_status_.currentExcite || 300 > this.maid_status_.currentSensual)) { return false; } if (command_data.basic.command_type == Yotogi.SkillCommandType.絶頂 && this.maid_status_.currentExcite < 80) { return false; } if (this.is_free_mode) { if (!command_data.EvalExpressionForFreeMode(this.maid_)) { return false; } } else if (!command_data.EvalExpression(this.maid_)) { return false; } if (command_data.basic.command_type == Yotogi.SkillCommandType.挿入) { return true; } if (command_data.basic.request_insert) { return this.player_state_ == YotogiPlay.PlayerState.Insert; } return this.player_state_ == YotogiPlay.PlayerState.Normal; }; bool flag = func(); if (this.command_menu != null && flag) { this.command_menu.AddCommand(command_data); } return flag; } private void OnChangeCommandTextColor(Skill.Data.Command.Data command_data, ref Color color) { if (command_data.status.bonusExcitementUpLine <= this.maid_.status.currentExcite || command_data.status.bonusExcitementDownLine > this.maid_.status.currentExcite) { color = Skill.Data.Command.bonusTargetTextColor; } } private void OnMouseCommand(GameObject commandObject, Skill.Data.Command.Data command_data, bool visible) { if (command_data == null || !visible) { this.commandExecConditionsPanel.SetActive(false); return; } List> list = new List>(); foreach (int num in command_data.basic.request_propensity) { Propensity.Data data = Propensity.GetData(num); string key = "性癖【" + data.drawName + "】"; list.Add(new KeyValuePair(key, this.maid_status_.propensitys.ContainsKey(num))); } if (command_data.basic.isEstrusTriggerCommand) { list.Add(new KeyValuePair("興奮 200", 200 <= this.maid_status_.currentExcite)); list.Add(new KeyValuePair("官能 300", 300 <= this.maid_status_.currentSensual)); } if (command_data.basic.executionConditionParameters != null) { List> list2 = command_data.basic.executionConditionParameters.CreateConditionTextAndStaturResults(this.maid_.status); foreach (KeyValuePair item in list2) { if (this.is_free_mode && !item.Key.Contains("興奮")) { list.Add(new KeyValuePair(item.Key, true)); } else { list.Add(item); } } } if (list.Count == 0) { this.commandExecConditionsPanel.SetActive(false); return; } List> list3 = new List>(); foreach (KeyValuePair keyValuePair in list) { list3.Add(new KeyValuePair(keyValuePair.Key, (!keyValuePair.Value) ? Color.gray : Color.white)); } this.commandExecConditionList.SetTexts(list3.ToArray(), -1); UIWidget component = UTY.GetChildObject(this.commandExecConditionsPanel, "BG", false).GetComponent(); component.width = this.commandExecConditionList.width + 25; component.height = this.commandExecConditionList.height + 65; Transform parent = this.commandExecConditionsPanel.transform.parent; this.commandExecConditionsPanel.transform.SetParent(commandObject.transform, false); this.commandExecConditionsPanel.transform.localPosition = Vector3.zero; this.commandExecConditionsPanel.transform.SetParent(parent, true); Vector3 localPosition = this.commandExecConditionsPanel.transform.localPosition; localPosition = new Vector3(localPosition.x + 194f, localPosition.y + 12f, localPosition.z); this.commandExecConditionsPanel.transform.localPosition = localPosition; this.commandExecConditionsPanel.SetActive(true); } private void UpdateCommand() { this.command_factory_.ClearCommand(); if (this.command_menu != null) { this.command_menu.ClearCommand(); } if (this.estrusMode && this.maid_.status.currentSensual <= 0) { if (this.command_menu != null) { this.command_menu.FixCommand(); } return; } if (!this.estrusMode && this.maid_.status.currentMind <= 0) { if (this.command_menu != null) { this.command_menu.FixCommand(); } return; } this.free_mode_backup_excitement_ = 0; for (int i = 0; i < this.valid_command_dic_.Count; i++) { Skill.Data.Command.Data data = this.valid_command_dic_[i]; if (!data.basic.isAcquisitionPropensityCommand || (!this.maid_.status.propensitys.ContainsKey(data.basic.learning_propensity.id) && !this.yotogi_mgr_.acquired_propensityid_list.Contains(data.basic.learning_propensity.id))) { if (!data.basic.isEstrusTriggerCommand || !this.estrusMode) { if (0 >= data.basic.request_skill_lv || data.basic.request_skill_lv == this.playing_skill_level_) { this.command_factory_.AddCommand(this.valid_command_dic_[i]); } } } } if (this.command_menu != null) { this.command_menu.FixCommand(); } } private void SetSkillTowerButtonEnabled(bool enabled) { Transform transform = this.skill_group_parent_.transform; int num = 0; while (num < this.yotogi_mgr_.play_skill_array.Length && num < transform.childCount) { YotogiManager.PlayingSkillData playingSkillData = this.yotogi_mgr_.play_skill_array[num]; GameObject gameObject = transform.GetChild(num).gameObject; GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false); UIButton component = childObject.GetComponent(); component.enabled = enabled; num++; } } private void UpdateSkillTower() { Transform transform = this.skill_group_parent_.transform; if (this.skill_icon_default_color_.a == 0f) { this.skill_icon_default_color_ = UTY.GetChildObject(transform.GetChild(0).gameObject, "Icon", false).GetComponent().defaultColor; } int num = 0; while (num < this.yotogi_mgr_.play_skill_array.Length && num < transform.childCount) { YotogiManager.PlayingSkillData playingSkillData = this.yotogi_mgr_.play_skill_array[num]; GameObject gameObject = transform.GetChild(num).gameObject; GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false); UI2DSprite component = childObject.GetComponent(); GameObject childObject2 = UTY.GetChildObject(gameObject, "Arrow", false); BoxCollider component2 = childObject.GetComponent(); UIButton component3 = childObject.GetComponent(); UISprite component4 = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent(); UILabel componentInChildren = component4.GetComponentInChildren(); UIRect uirect = component4; float alpha = 0f; componentInChildren.alpha = alpha; uirect.alpha = alpha; childObject2.SetActive(false); if (playingSkillData.skill_pair.base_data == null) { childObject.SetActive(false); } else { componentInChildren.text = playingSkillData.skill_pair.base_data.name; componentInChildren.width = 0; componentInChildren.MakePixelPerfect(); component4.width = componentInChildren.width + 20; childObject.SetActive(true); childObject.GetComponent().depth = childObject2.GetComponent().depth; if (playingSkillData.is_play || this.playing_skill_no_ == num) { component3.enabled = false; if (this.playing_skill_no_ != num) { component.color = new Color(0.4f, 0.4f, 0.4f, 0.4f); } else { component.color = new Color(1f, 1f, 1f, 1f); childObject2.SetActive(true); } childObject.GetComponent().enabled = false; } else { component.color = this.skill_icon_default_color_; component3.enabled = true; childObject.GetComponent().enabled = true; } YotogiSkillIcon component5 = childObject.GetComponent(); component5.SetSkillData(this.yotogi_mgr_.play_skill_array[num].skill_pair.base_data); } num++; } } private void OnSkillIconClick() { if (this.yotogi_mgr_.IsAllCharaBusy()) { this.yotogi_mgr_.AddDebugLog("============================================"); this.yotogi_mgr_.AddDebugLog("×スキルアイコンがクリックされました"); this.yotogi_mgr_.AddDebugLog("IsBusy状態なのでキャンセルしました"); this.yotogi_mgr_.AddDebugLog("============================================"); return; } Transform transform = this.skill_group_parent_.transform; UIButton current = UIButton.current; int num = -1; for (int i = 0; i < this.yotogi_mgr_.play_skill_array.Length; i++) { GameObject gameObject = transform.GetChild(i).gameObject; GameObject childObject = UTY.GetChildObject(gameObject, "Icon", false); if (childObject.GetComponent() == current) { num = i - 1; break; } } if (num == -1) { return; } this.playing_skill_no_ = num; this.OnNextSkillMove(); } public void VisibleSkillName(int icon_no, bool val) { GameObject gameObject = this.skill_group_parent_.transform.GetChild(icon_no).gameObject; UISprite component = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent(); UILabel componentInChildren = component.GetComponentInChildren(); float num = 0f; if (val) { num = 1f; } UIRect uirect = component; float alpha = num; componentInChildren.alpha = alpha; uirect.alpha = alpha; } private void ClearCommandFile() { this.script_mgr_.EvalScript("global.__skill_command_file.clear();"); } private void CallCommandFile(string file, string label, bool lockRRUpdate) { if (string.IsNullOrEmpty(file) || file == ".ks") { return; } file = ScriptManager.ReplacePersonal(this.replace_personal_target_maid_array_, file); file = Path.ChangeExtension(file, ".ks"); bool flag = false; using (TJSVariant tjsvariant = new TJSVariant()) { this.script_mgr_.EvalScript("global.__skill_command_file.count;", tjsvariant); if (0 < tjsvariant.AsInteger()) { flag = true; } } if (!flag) { this.ClearCommandFile(); this.script_mgr_.EvalScript(string.Concat(new string[] { "global.__skill_command_file.add(%['file'=>'", file, "','label'=>'", label, "','rrlock'=>'", lockRRUpdate.ToString().ToLower(), "']);" })); this.script_mgr_.LoadYotogiScript("yotogi_skill_command_call_main.ks", string.Empty); this.yotogi_mgr_.AddDebugLog(string.Concat(new string[] { "コマンドファイル[", file, "][", label, "]を呼び出しました" })); } else { this.script_mgr_.EvalScript(string.Concat(new string[] { "global.__skill_command_file.add(%['file'=>'", file, "','label'=>'", label, "','rrlock'=>'", lockRRUpdate.ToString().ToLower(), "']);" })); } } public void OnClickReleaseSeieki() { CharacterMgr characterMgr = GameMain.Instance.CharacterMgr; for (int i = 0; i < characterMgr.GetMaidCount(); i++) { Maid maid = characterMgr.GetMaid(i); if (maid != null) { maid.body0.MulTexRemove("body", 0, "_MainTex", 18); maid.body0.MulTexRemove("body", 0, "_ShadowTex", 18); maid.body0.MulTexRemove("head", 5, "_MainTex", 18); maid.body0.MulTexRemove("head", 5, "_ShadowTex", 18); maid.body0.MulTexProc("body"); maid.body0.MulTexProc("head"); } } } private void OnClickSkillSelectEnd() { this.free_skill_select_.FixSkill(); this.playing_skill_no_ = 0; this.OnNextSkillMove(); } public void OnClickNext() { if (this.yotogi_mgr_.IsAllCharaBusy()) { this.yotogi_mgr_.AddDebugLog("============================================"); this.yotogi_mgr_.AddDebugLog("×スキルアイコンがクリックされました"); this.yotogi_mgr_.AddDebugLog("IsBusy状態なのでキャンセルしました"); this.yotogi_mgr_.AddDebugLog("============================================"); return; } this.playing_skill_no_ = -1; if (!this.is_free_mode && !this.is_vr_mode) { for (int i = 0; i < this.yotogi_mgr_.play_skill_array.Length; i++) { if (this.yotogi_mgr_.play_skill_array[i].skill_pair.base_data != null) { if (!this.yotogi_mgr_.play_skill_array[i].is_play) { this.playing_skill_no_ = i - 1; break; } } } } this.OnNextSkillMove(); } private void OnNextSkillMove() { if (this.command_menu != null) { this.command_menu.DestroySkillCommand(); this.command_menu.visible = false; } if (this.is_free_mode) { this.maid_.status.seikeiken = this.free_mode_backup_data_.seikeiken; } GameMain.Instance.SoundMgr.StopSe(); this.yotogi_mgr_.yotogi_kag.enabled = false; if (this.IsFaint() || (!this.is_free_mode && !this.is_vr_mode && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint)) { this.is_faint_end = true; } else if (this.playing_skill_no_ == -1) { this.ClearCommandFile(); this.SetRepeatVoiceFile(string.Empty, 0); this.ClearVoice(); if (this.yotogi_mgr_.null_mgr.IsExistNextLabel()) { this.Finish(); } } else { this.Finish(); } } private void OnClickViweReset() { this.camera_move_support_.ResetCamera(); } protected override void OnFinish() { if (!this.is_free_mode && !this.is_vr_mode && this.playing_skill_ != null && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint) { this.maid_status_.currentMind = 0; } if (this.playing_skill_no_ == -1 || this.IsFaint()) { this.playing_skill_no_ = -1; if (this.is_free_mode || this.is_vr_mode) { GameMain.Instance.SoundMgr.VoiceStopAll(); GameMain.Instance.SoundMgr.StopSe(); CharacterMgr characterMgr = GameMain.Instance.CharacterMgr; GameMain.Instance.ScriptMgr.ClearForcExecWaitEvent(); for (int i = 0; i < characterMgr.GetMaidCount(); i++) { Maid maid = characterMgr.GetMaid(i); if (maid != null) { maid.FaceAnime("通常", 0f, 0); maid.FaceBlend("無し"); maid.OpenMouth(false); maid.body0.SetMaskMode(TBody.MaskMode.None); for (int j = 10; j <= 20; j++) { maid.body0.MulTexRemove("body", 0, "_MainTex", j); maid.body0.MulTexRemove("body", 0, "_ShadowTex", j); maid.body0.MulTexRemove("head", 5, "_MainTex", j); maid.body0.MulTexRemove("head", 5, "_ShadowTex", j); } maid.body0.MulTexRemove("body", 0, "_MainTex", 24); maid.body0.MulTexRemove("body", 0, "_ShadowTex", 24); maid.body0.MulTexProc("body"); maid.body0.MulTexProc("head"); } } this.yotogi_mgr_.ResetWorld(); characterMgr.DeactivateCharaAll(); } else { this.yotogi_mgr_.ApplyStatus(); } if (this.yotogi_mgr_.null_mgr.IsExistNextLabel()) { this.yotogi_mgr_.CallScreen(YotogiManager.CallScreenType.Null.ToString()); } else { this.yotogi_mgr_.DebugOnClickCallResult(); } } else { GameMain.Instance.CharacterMgr.SetCharaAllPos(Vector3.zero); GameMain.Instance.CharacterMgr.SetCharaAllRot(Vector3.zero); this.yotogi_mgr_.CallScreen(YotogiManager.CallScreenType.Play.ToString()); } } protected override void OnFadeEnd() { if (this.is_free_mode || this.is_vr_mode) { GameMain.Instance.MainLight.Reset(); GameMain.Instance.CharacterMgr.ResetCharaPosAll(); GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true); GameMain.Instance.SoundMgr.VoiceStopAll(); this.yotogi_mgr_.UnVisibleMaidAndMan(true, true); this.maid_.Visible = true; } } public void SetControlMask(bool val, bool is_endless = false) { if (!val) { this.control_mask_tick_count = -1; for (int i = 0; i < this.control_mask_list_.Count; i++) { this.control_mask_list_[i].SetActive(false); } } else { this.control_mask_tick_count = GameMain.tick_count + 3000; if (is_endless) { this.control_mask_tick_count = int.MaxValue; } for (int j = 0; j < this.control_mask_list_.Count; j++) { this.control_mask_list_[j].SetActive(true); } } } public void OnUndressingEvent(string call_file) { if (string.IsNullOrEmpty(call_file)) { return; } } public void ChangeSliderValue() { float value = UIProgressBar.current.value; int manAlpha = (int)System.Math.Ceiling((double)(value * 100f)); GameMain.Instance.CMSystem.ManAlpha = manAlpha; this.setting_man_alpha_ = manAlpha; GameMain.Instance.CharacterMgr.ManAlphaUpdate(); } public void OnClickExciteLock() { this.is_excite_lock_ = !this.is_excite_lock_; GameMain.Instance.CMSystem.SetSystemVers("ExciteLock", (!this.is_excite_lock_) ? "0" : "1"); this.btn_excite_lock_.SetSelect(this.is_excite_lock_); } public bool IsFaint() { return !this.is_free_mode && !this.is_vr_mode && ((this.maid_.status.currentMind <= 0 && this.maid_.status.currentHp <= 0) || (this.playing_skill_no_ == -1 && this.maid_.status.currentHp <= 0)); } public List repeat_voice_data_list { get { return this.repeat_voice_data_list_; } } private bool is_free_mode { get { return this.yotogi_mgr_.is_free_mode; } } private bool is_vr_mode { get { return this.yotogi_mgr_.is_vr_mode; } } private YotogiCommandMenuOVR command_menu { get { return this.yotogi_mgr_.command_menu; } } private bool particleBreathe { get { return 0 < this.breatheObjects.Count && this.breatheObjects[0].activeInHierarchy; } set { bool flag = value; if (flag && (!this.estrusMode || this.maid_status_.currentExcite < 200)) { flag = false; } foreach (GameObject gameObject in this.breatheObjects) { gameObject.SetActive(flag); } } } private int particleLoveLiquidType { get { for (int i = 0; i < this.loveLiquidObjects.Length; i++) { if (this.loveLiquidObjects[i].activeInHierarchy) { return i + 1; } } return 0; } set { int num = wf.Math.RoundMinMax(value, 0, 3); if (num != 0 && !this.estrusMode) { num = 0; } if (num != 0) { for (int i = 0; i < this.loveLiquidObjects.Length; i++) { this.loveLiquidObjects[i].SetActive(i == num - 1); } } else { foreach (GameObject gameObject in this.loveLiquidObjects) { gameObject.SetActive(false); } } } } public int kRepeatWaitTime = 200; public bool lockRepeatVoiceUpdate; private Maid maid_; private ScriptManager script_mgr_; private Status maid_status_; private YotogiManager yotogi_mgr_; private YotogiManager.PlayingSkillData playing_skill_; private Yotogi.SkillDataPair skill_pair_; private YotogiParameterViewer paramenter_viewer_; private YotogiCommandFactory command_factory_; private YotogiParamScroll param_scroll_; private YotogiParamBasicBar param_basic_bar_; private YotogiCommonButtons common_buttons_; private FreeSkillSelect free_skill_select_; private WfCameraMoveSupport camera_move_support_; private GameObject skill_group_parent_; private UISlider man_alpha_slider_; private UndressingManager undressing_mgr_; private List control_mask_list_ = new List(); private int setting_man_alpha_; private HashSet play_command_id_ = new HashSet(); private int control_mask_tick_count = -1; private Color skill_icon_default_color_; private Maid[] replace_personal_target_maid_array_; private YotogiPlayManager.FreeModeBackUpData free_mode_backup_data_; private UIWFSelectButton btn_excite_lock_; private bool is_excite_lock_; private bool estrusMode; private GameObject commandExecConditionsPanel; private UIWFConditionList commandExecConditionList; private List breatheObjects = new List(); private GameObject[] loveLiquidObjects = new GameObject[0]; private bool doneFtFileCall; private bool is_faint_end; private List repeat_voice_data_list_ = new List(); private int playing_skill_level_; private int playing_skill_no_; private YotogiPlay.PlayerState player_state_; private YotogiPlay.Param backup_maid_param_; private BonusStatus bonusCorrectionStatus_; private List valid_command_dic_ = new List(); private int free_mode_backup_excitement_; private struct FreeModeBackUpData { public Seikeiken seikeiken; } public class RepeatVoiceData { public string repeat_voice_file; public int elapsed_time; public int maid_no; } }