1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095 |
- 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<YotogiManager>();
- 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<YotogiCommonButtons>();
- this.command_factory_ = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/SkillGroup/CommandParent/CommandUnit", false).GetComponent<YotogiCommandFactory>();
- 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<YotogiParamScroll>();
- this.camera_move_support_ = base.gameObject.AddComponent<WfCameraMoveSupport>();
- this.man_alpha_slider_ = UTY.GetChildObject(base.root_obj, "UndressingViewer/UndressingViewer/MaskGroup/PlayerModelTransparency/SliderParent/Slider", false).GetComponent<UISlider>();
- 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<UndressingManager>();
- this.undressing_mgr_.SetCallBackEvent(new UndressingManager.OnClickEventDelegate(this.OnUndressingEvent));
- this.btn_excite_lock_ = UTY.GetChildObject(base.root_obj, "StatusSlider/ParameterViewer/MaskGroup/Lock", false).GetComponent<UIWFSelectButton>();
- 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<UIButton>();
- component.onClick.Clear();
- UISprite component2 = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent<UISprite>();
- UILabel componentInChildren = component2.GetComponentInChildren<UILabel>();
- 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<UIEventTrigger>();
- 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<UIWFConditionList>();
- 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<Skill.Data.Command.Data>(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<YotogiParamBasicBar>();
- this.paramenter_viewer_ = Utility.CreatePrefab(UTY.GetChildObject(base.root_obj, "ParameterViewer/YotogiParameterViewer/MaskGroup", false), "SceneYotogi/Common/Prefab/ParameterViewer", true).GetComponent<YotogiParameterViewer>();
- 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<YotogiParamBasicBarPlusSlider>();
- 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<FreeSkillSelect>();
- 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<UIButton>();
- 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<GameObject>();
- 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;
- if (this.subtitlesManager != null)
- {
- this.subtitlesManager.visible = false;
- this.subtitlesManager.SetTextFromScriptStyle(string.Empty);
- }
- }
- 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<UIButton>();
- 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<int, string> 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.subtitlesManager != null && !string.IsNullOrEmpty(repeatVoiceData.text))
- {
- this.message_display_time_ = float.MaxValue;
- this.subtitlesManager.SetTextFromScriptStyle(repeatVoiceData.text);
- }
- }
- }
- }
- }
- }
- }
- 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()
- {
- this.message_display_time_ = 0f;
- 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<Maid> list = new List<Maid>();
- 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<float, int> feiling_func = (float ceiling_num) => (0f > ceiling_num) ? ((int)System.Math.Floor((double)ceiling_num)) : ((int)System.Math.Ceiling((double)ceiling_num));
- Func<int, int, int> 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<int, int, int> 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<int, int, int> 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 SetMessageText(string text)
- {
- }
- public void SetMessageTextDisplayTime(int time)
- {
- }
- 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 AddRepeatVoiceText(string text)
- {
- }
- 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<ParticleSystem>().main.startDelay = 2.5f;
- }
- }
- else if (this.particleLoveLiquidType == 0)
- {
- foreach (GameObject gameObject2 in this.loveLiquidObjects)
- {
- gameObject2.GetComponent<ParticleSystem>().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<List<KeyValuePair<string, int>>, string, int> action = delegate(List<KeyValuePair<string, int>> list, string name, int num)
- {
- if (num == 0)
- {
- return;
- }
- list.Add(new KeyValuePair<string, int>(name, num));
- };
- List<KeyValuePair<string, int>> list2 = new List<KeyValuePair<string, int>>();
- 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();
- this.SetMessageTextDisplayTime(0);
- 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<Yotogi.RRCType> hashSet = new HashSet<Yotogi.RRCType>();
- 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<Yotogi.RRCType, Yotogi.RRCType> dictionary = new Dictionary<Yotogi.RRCType, Yotogi.RRCType>();
- 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<bool> 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<KeyValuePair<string, bool>> list = new List<KeyValuePair<string, bool>>();
- foreach (int num in command_data.basic.request_propensity)
- {
- Propensity.Data data = Propensity.GetData(num);
- string key = "性癖【" + data.drawName + "】";
- list.Add(new KeyValuePair<string, bool>(key, this.maid_status_.propensitys.ContainsKey(num)));
- }
- if (command_data.basic.isEstrusTriggerCommand)
- {
- list.Add(new KeyValuePair<string, bool>("興奮 200", 200 <= this.maid_status_.currentExcite));
- list.Add(new KeyValuePair<string, bool>("官能 300", 300 <= this.maid_status_.currentSensual));
- }
- if (command_data.basic.executionConditionParameters != null)
- {
- List<KeyValuePair<string, bool>> list2 = command_data.basic.executionConditionParameters.CreateConditionTextAndStaturResults(this.maid_.status);
- foreach (KeyValuePair<string, bool> item in list2)
- {
- if (this.is_free_mode && !item.Key.Contains("興奮"))
- {
- list.Add(new KeyValuePair<string, bool>(item.Key, true));
- }
- else
- {
- list.Add(item);
- }
- }
- }
- if (list.Count == 0)
- {
- this.commandExecConditionsPanel.SetActive(false);
- return;
- }
- List<KeyValuePair<string, Color>> list3 = new List<KeyValuePair<string, Color>>();
- foreach (KeyValuePair<string, bool> keyValuePair in list)
- {
- list3.Add(new KeyValuePair<string, Color>(keyValuePair.Key, (!keyValuePair.Value) ? Color.gray : Color.white));
- }
- this.commandExecConditionList.SetTexts(list3.ToArray(), -1);
- UIWidget component = UTY.GetChildObject(this.commandExecConditionsPanel, "BG", false).GetComponent<UIWidget>();
- 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<UIButton>();
- 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<UIButton>().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<UI2DSprite>();
- GameObject childObject2 = UTY.GetChildObject(gameObject, "Arrow", false);
- BoxCollider component2 = childObject.GetComponent<BoxCollider>();
- UIButton component3 = childObject.GetComponent<UIButton>();
- UISprite component4 = UTY.GetChildObject(gameObject, "SkillName", false).GetComponent<UISprite>();
- UILabel componentInChildren = component4.GetComponentInChildren<UILabel>();
- 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<UIWidget>().depth = childObject2.GetComponent<UIWidget>().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<UIPlayAnimation>().enabled = false;
- }
- else
- {
- component.color = this.skill_icon_default_color_;
- component3.enabled = true;
- childObject.GetComponent<UIPlayAnimation>().enabled = true;
- }
- YotogiSkillIcon component5 = childObject.GetComponent<YotogiSkillIcon>();
- 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<UIButton>() == 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<UISprite>();
- UILabel componentInChildren = component.GetComponentInChildren<UILabel>();
- 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<YotogiPlayManager.RepeatVoiceData> 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 SubtitlesDisplayManager subtitlesManager;
- 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<GameObject> control_mask_list_ = new List<GameObject>();
- private int setting_man_alpha_;
- private HashSet<int> play_command_id_ = new HashSet<int>();
- 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<GameObject> breatheObjects = new List<GameObject>();
- private GameObject[] loveLiquidObjects = new GameObject[0];
- private bool doneFtFileCall;
- private bool is_faint_end;
- private List<YotogiPlayManager.RepeatVoiceData> repeat_voice_data_list_ = new List<YotogiPlayManager.RepeatVoiceData>();
- 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<Skill.Data.Command.Data> valid_command_dic_ = new List<Skill.Data.Command.Data>();
- private int free_mode_backup_excitement_;
- private float message_display_time_;
- private struct FreeModeBackUpData
- {
- public Seikeiken seikeiken;
- }
- public class RepeatVoiceData
- {
- public string repeat_voice_file;
- public int elapsed_time;
- public int maid_no;
- public string text;
- }
- }
|