1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006 |
- using System;
- using System.Collections.Generic;
- using MaidStatus;
- using MaidStatus.CsvData;
- using Schedule;
- using UnityEngine;
- using wf;
- using Yotogis;
- public class YotogiManager : WfScreenManager
- {
- public bool uiVisible
- {
- get
- {
- return base.gameObject.transform.parent.GetComponent<UIPanel>().alpha != 0f;
- }
- set
- {
- base.gameObject.transform.parent.GetComponent<UIPanel>().alpha = (float)((!value) ? 0 : 1);
- }
- }
- public bool messageWindowVisible
- {
- set
- {
- GameObject gameObject = GameObject.Find("SystemUI Root/Manager_SystemUI/MessageWindowMgr");
- if (gameObject != null)
- {
- MessageWindowMgr component = gameObject.GetComponent<MessageWindowMgr>();
- if (component != null)
- {
- if (value)
- {
- component.OpenMessageWindowPanel();
- }
- else
- {
- component.CloseMessageWindowPanel();
- }
- }
- }
- }
- }
- public void Awake()
- {
- YotogiStage.CreateData();
- YotogiManager.instans = this;
- this.play_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiPlayManager", false).GetComponent<YotogiPlayManager>();
- this.skill_select_mgr_ = UTY.GetChildObject(base.gameObject, "SkillSelectManager", false).GetComponent<YotogiSkillSelectManager>();
- this.result_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiResultManager", false).GetComponent<YotogiResultManager>();
- this.free_skill_select_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiFreeSkillSelectManager", false).GetComponent<YotogiFreeSkillSelectManager>();
- this.stage_select_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiStageSelectManager", false).GetComponent<YotogiStageSelectManager>();
- this.sub_chara_select_mgr_ = UTY.GetChildObject(base.gameObject, "SubCharacterSelectManager", false).GetComponent<YotogiSubCharacterSelectManager>();
- this.null_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiNullManager", false).GetComponent<YotogiNullManager>();
- for (int i = 0; i < this.play_skill_array_.Length; i++)
- {
- this.play_skill_array_[i] = new YotogiManager.PlayingSkillData();
- }
- this.addTagNames.Clear();
- this.adv_kag_ = GameMain.Instance.ScriptMgr.adv_kag;
- this.yotogi_kag_ = GameMain.Instance.ScriptMgr.yotogi_kag;
- Action<string, KagScript.KagTagCallBack> action = delegate(string tagName, KagScript.KagTagCallBack callback)
- {
- this.addTagNames.Add(tagName);
- this.adv_kag_.kag.AddTagCallBack(tagName, callback);
- };
- action("yotogicall", new KagScript.KagTagCallBack(this.TagYotogiCall));
- action("returnsuspend", new KagScript.KagTagCallBack(this.TagReturnSuspend));
- action("restart", new KagScript.KagTagCallBack(this.TagReStart));
- action("playend", new KagScript.KagTagCallBack(this.TagPlayEnd));
- action("heroinechangeskill", new KagScript.KagTagCallBack(this.TagHeroineChangeSkill));
- this.yotogi_kag_.kag.AddTagCallBack("playbgmroom", new KagScript.KagTagCallBack(this.TagPlayBGMRoom));
- this.yotogi_kag_.kag.AddTagCallBack("controlmask", new KagScript.KagTagCallBack(this.TagControlMask));
- this.yotogi_kag_.enabled = false;
- }
- public override void Start()
- {
- base.Start();
- this.maid_ = GameMain.Instance.CharacterMgr.GetMaid(0);
- this.backup_status_.skill_id_list = new HashSet<int>();
- this.backup_status_.yotogi_class_list = new HashSet<int>();
- this.CreateBackUpStatus();
- this.CreateBackUpSkillID();
- this.CreateBackUpYotogiClass();
- GameMain.Instance.ScriptMgr.yotogi_kag.SetYotogiManager(this);
- string b = "SceneYotogi";
- this.is_new_yotogi_ = false;
- this.is_free_mode_ = this.adv_kag_.tag_backup.ContainsKey("free_start");
- this.is_vr_mode_ = this.adv_kag_.tag_backup.ContainsKey("vr_mode");
- if (GameMain.Instance.VRMode)
- {
- this.command_menu_ = Utility.CreatePrefab(null, "SceneYotogi/Yotogi/Prefab/VRUI CommandMenu", true).GetComponent<YotogiCommandMenuOVR>();
- this.command_menu_.transform.SetParent(base.gameObject.transform, true);
- this.command_menu_.visible = false;
- }
- this.is_script_call_ = false;
- if (this.adv_kag_.tag_backup != null && 0 < this.adv_kag_.tag_backup.Count && this.adv_kag_.tag_backup["name"] == b)
- {
- this.is_script_call_ = true;
- NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("start"), "SceneCallにstartの設定がされていませんでした");
- NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("label"), "SceneCallにlabelの設定がされていませんでした");
- string text = this.adv_kag_.tag_backup["start"];
- YotogiManager.CallScreenType callScreenType = YotogiManager.CallScreenType.Null;
- try
- {
- callScreenType = (YotogiManager.CallScreenType)Enum.Parse(typeof(YotogiManager.CallScreenType), text);
- }
- catch
- {
- NDebug.Assert("[" + text + "]を特定できませんでした", false);
- }
- this.is_new_yotogi_ = (callScreenType == YotogiManager.CallScreenType.Init);
- if ((callScreenType == YotogiManager.CallScreenType.SubCharaSelect || callScreenType == YotogiManager.CallScreenType.FreeSkillSelect) && this.adv_kag_.tag_backup.ContainsKey("cancel_label"))
- {
- YotogiFreeSkillSelectManager yotogiFreeSkillSelectManager = this.free_skill_select_mgr_;
- string cancel_label = this.adv_kag_.tag_backup["cancel_label"];
- this.sub_chara_select_mgr_.cancel_label = cancel_label;
- yotogiFreeSkillSelectManager.cancel_label = cancel_label;
- }
- string nextLabel = this.adv_kag_.tag_backup["label"];
- this.null_mgr_.SetNextLabel(nextLabel);
- if (callScreenType == YotogiManager.CallScreenType.SkillSelect && this.adv_kag_.tag_backup.ContainsKey("edit_label"))
- {
- this.skill_select_mgr_.SetEditNextLabel(this.adv_kag_.tag_backup["edit_label"]);
- }
- this.CallScreen(text);
- }
- else if (this.is_free_mode)
- {
- this.CallScreen(YotogiManager.CallScreenType.FreeSkillSelect.ToString());
- }
- else
- {
- this.CallScreen(YotogiManager.CallScreenType.StageSelect.ToString());
- }
- }
- public override void Update()
- {
- base.Update();
- }
- public void OnPreFinalize()
- {
- this.adv_kag_ = null;
- this.yotogi_kag_ = null;
- }
- public void OnDestroy()
- {
- YotogiManager.instans = null;
- if (this.adv_kag_ != null)
- {
- if (this.adv_kag_.kag != null)
- {
- foreach (string tag_name in this.addTagNames)
- {
- this.adv_kag_.kag.RemoveTagCallBack(tag_name);
- }
- }
- this.adv_kag_ = null;
- if (this.yotogi_kag_.kag != null)
- {
- this.yotogi_kag_.kag.RemoveTagCallBack("playbgmroom");
- this.yotogi_kag_.kag.RemoveTagCallBack("controlmask");
- }
- this.yotogi_kag_ = null;
- }
- }
- public bool TagYotogiCall(KagTagSupport tag_data)
- {
- this.adv_kag_.CheckAbsolutelyNecessaryTag(tag_data, "yotogicall", new string[]
- {
- "name",
- "label"
- });
- string text = tag_data.GetTagProperty("name").AsString();
- YotogiManager.CallScreenType callScreenType = YotogiManager.CallScreenType.Null;
- try
- {
- callScreenType = (YotogiManager.CallScreenType)Enum.Parse(typeof(YotogiManager.CallScreenType), text);
- }
- catch
- {
- NDebug.Assert("@yotogicall : [" + text + "]を特定できませんでした", false);
- }
- if ((callScreenType == YotogiManager.CallScreenType.SubCharaSelect || callScreenType == YotogiManager.CallScreenType.FreeSkillSelect) && tag_data.IsValid("cancel_label"))
- {
- YotogiFreeSkillSelectManager yotogiFreeSkillSelectManager = this.free_skill_select_mgr_;
- string cancel_label = tag_data.GetTagProperty("cancel_label").AsString();
- this.sub_chara_select_mgr_.cancel_label = cancel_label;
- yotogiFreeSkillSelectManager.cancel_label = cancel_label;
- }
- this.null_mgr_.SetNextLabel(tag_data.GetTagProperty("label").AsString());
- if (callScreenType == YotogiManager.CallScreenType.SkillSelect && tag_data.IsValid("edit_label"))
- {
- this.skill_select_mgr_.SetEditNextLabel(tag_data.GetTagProperty("edit_label").AsString());
- }
- if (callScreenType == YotogiManager.CallScreenType.Play && tag_data.IsValid("skillid"))
- {
- int num = tag_data.GetTagProperty("skillid").AsInteger();
- Skill.Data data = Skill.Get(num);
- if (data == null)
- {
- Debug.LogError("TagReStart Error\nnot find yotogiSkill " + num);
- return false;
- }
- for (int i = 0; i < this.play_skill_array.Length; i++)
- {
- if (this.play_skill_array[i].skill_pair.base_data == null)
- {
- YotogiManager.PlayingSkillData playingSkillData = new YotogiManager.PlayingSkillData();
- playingSkillData.skill_pair = Yotogi.SkillDataPair.Create(this.maid_, data);
- playingSkillData.skill_pair.lock_skill_exp = true;
- playingSkillData.backup_total_exp = playingSkillData.skill_pair.skill_data.expSystem.GetTotalExp();
- this.play_skill_array[i] = playingSkillData;
- break;
- }
- }
- }
- this.CallScreen(text);
- return false;
- }
- public bool TagReturnSuspend(KagTagSupport tag_data)
- {
- if (this.play_mgr != null)
- {
- this.play_mgr.ReturnSuspend();
- }
- return false;
- }
- public bool TagReStart(KagTagSupport tag_data)
- {
- this.adv_kag_.CheckAbsolutelyNecessaryTag(tag_data, "restart", new string[]
- {
- "skillid"
- });
- if (tag_data.IsValid("label"))
- {
- string text = tag_data.GetTagProperty("label").AsString();
- if (!string.IsNullOrEmpty(text))
- {
- this.null_mgr.SetNextLabel(text);
- }
- }
- int num = tag_data.GetTagProperty("skillid").AsInteger();
- Skill.Data data = Skill.Get(num);
- if (data == null)
- {
- Debug.LogError("TagReStart Error\nnot find yotogiSkill " + num);
- return false;
- }
- for (int i = 0; i < this.play_skill_array.Length; i++)
- {
- if (this.play_skill_array[i].skill_pair.base_data == null)
- {
- YotogiManager.PlayingSkillData playingSkillData = new YotogiManager.PlayingSkillData();
- playingSkillData.skill_pair = Yotogi.SkillDataPair.Create(this.maid_, data);
- playingSkillData.skill_pair.lock_skill_exp = true;
- playingSkillData.backup_total_exp = playingSkillData.skill_pair.skill_data.expSystem.GetTotalExp();
- this.play_skill_array[i] = playingSkillData;
- break;
- }
- }
- this.play_mgr_.ReStart();
- return false;
- }
- public bool TagPlayEnd(KagTagSupport tag_data)
- {
- if (tag_data.IsValid("label"))
- {
- string text = tag_data.GetTagProperty("label").AsString();
- if (!string.IsNullOrEmpty(text))
- {
- this.null_mgr.SetNextLabel(text);
- }
- }
- if (string.IsNullOrEmpty(this.null_mgr.nextLabel))
- {
- return false;
- }
- this.play_mgr_.SetFadeTime(0f);
- this.play_mgr_.AdvanceSkillMove();
- this.maid_.status.currentMind = this.maid_.status.maxMind;
- return false;
- }
- public bool TagHeroineChangeSkill(KagTagSupport tag_data)
- {
- this.play_mgr_.heroineChangeFlag = true;
- return false;
- }
- public bool TagPlayBGMRoom(KagTagSupport tag_data)
- {
- List<YotogiStage.Data> allDatas = YotogiStage.GetAllDatas(false);
- YotogiStage.Data data = null;
- foreach (YotogiStage.Data data2 in allDatas)
- {
- if (YotogiStageSelectManager.SelectedStage == data2)
- {
- data = data2;
- break;
- }
- }
- if (data == null)
- {
- Debug.LogError("@playbgmroomエラー prefab名[" + YotogiStageSelectManager.SelectedStage.drawName + "]から背景データを特定できませんでした");
- return false;
- }
- int millisecond = 0;
- if (tag_data.IsValid("fade"))
- {
- millisecond = tag_data.GetTagProperty("fade").AsInteger();
- }
- GameMain.Instance.SoundMgr.PlayBGM(data.bgmFileName, GameUty.MillisecondToSecond(millisecond), true);
- return false;
- }
- public bool TagControlMask(KagTagSupport tag_data)
- {
- if (base.cur_call_screen_name == "Play" && this.play_mgr_ != null)
- {
- this.play_mgr_.SetControlMask(true, false);
- }
- return false;
- }
- protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> children_dic)
- {
- children_dic.Add(YotogiManager.CallScreenType.SkillSelect.ToString(), this.skill_select_mgr_);
- children_dic.Add(YotogiManager.CallScreenType.Result.ToString(), this.result_mgr_);
- children_dic.Add(YotogiManager.CallScreenType.FreeSkillSelect.ToString(), this.free_skill_select_mgr_);
- children_dic.Add(YotogiManager.CallScreenType.StageSelect.ToString(), this.stage_select_mgr_);
- children_dic.Add(YotogiManager.CallScreenType.Init.ToString(), this.stage_select_mgr_);
- children_dic.Add(YotogiManager.CallScreenType.Play.ToString(), this.play_mgr_);
- children_dic.Add(YotogiManager.CallScreenType.SubCharaSelect.ToString(), this.sub_chara_select_mgr_);
- children_dic.Add(YotogiManager.CallScreenType.Null.ToString(), this.null_mgr_);
- }
- public void CreateBackUpStatus()
- {
- if (this.maid_ == null)
- {
- return;
- }
- this.backup_status_.param = YotogiPlay.Param.Create(this.maid_);
- this.backup_status_.propensity = new HashSet<int>(this.maid_.status.propensitys.GetKeyArray());
- }
- public void CreateBackUpSkillID()
- {
- if (this.maid_ == null)
- {
- return;
- }
- this.backup_status_.skill_id_list = new HashSet<int>(this.maid_.status.yotogiSkill.datas.GetKeyArray());
- }
- public void CreateBackUpYotogiClass()
- {
- this.backup_status_.yotogi_class_list = new HashSet<int>(this.maid_.status.yotogiClass.datas.GetKeyArray());
- }
- public void SetPlaySkillArray(KeyValuePair<Skill.Data, bool>[] skill_array)
- {
- this.play_skill_array_ = new YotogiManager.PlayingSkillData[7];
- for (int i = 0; i < this.play_skill_array_.Length; i++)
- {
- this.play_skill_array_[i] = new YotogiManager.PlayingSkillData();
- this.play_skill_array_[i].exp = 0;
- this.play_skill_array_[i].backup_total_exp = 0;
- this.play_skill_array_[i].is_play = false;
- if (i < skill_array.Length)
- {
- Skill.Data key = skill_array[i].Key;
- bool value = skill_array[i].Value;
- if (this.is_free_mode || this.is_vr_mode)
- {
- this.play_skill_array_[i].skill_pair = Yotogi.SkillDataPair.CreateBaseDataOnly(this.maid_, key);
- }
- else
- {
- this.play_skill_array_[i].skill_pair = Yotogi.SkillDataPair.Create(this.maid_, key);
- this.play_skill_array_[i].skill_pair.lock_skill_exp = value;
- this.play_skill_array_[i].backup_total_exp = this.play_skill_array_[i].skill_pair.skill_data.expSystem.GetTotalExp();
- }
- }
- else
- {
- this.play_skill_array_[i].skill_pair.base_data = null;
- }
- }
- }
- public void AddPlaySkill(Skill.Data skillData)
- {
- YotogiManager.PlayingSkillData[] array = this.play_skill_array_;
- this.play_skill_array_ = new YotogiManager.PlayingSkillData[this.play_skill_array_.Length + 1];
- for (int i = 0; i < array.Length; i++)
- {
- this.play_skill_array_[i] = array[i];
- }
- YotogiManager.PlayingSkillData playingSkillData = new YotogiManager.PlayingSkillData();
- playingSkillData.exp = 0;
- playingSkillData.backup_total_exp = 0;
- playingSkillData.is_play = false;
- playingSkillData.skill_pair = Yotogi.SkillDataPair.Create(this.maid_, skillData);
- playingSkillData.skill_pair.lock_skill_exp = true;
- playingSkillData.backup_total_exp = playingSkillData.skill_pair.skill_data.expSystem.GetTotalExp();
- this.play_skill_array_[this.play_skill_array_.Length - 1] = playingSkillData;
- }
- public bool IsAllCharaBusy()
- {
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- for (int i = 0; i < characterMgr.GetMaidCount(); i++)
- {
- Maid maid = characterMgr.GetMaid(i);
- if (maid != null && maid.Visible && maid.IsBusy)
- {
- return true;
- }
- }
- for (int j = 0; j < characterMgr.GetManCount(); j++)
- {
- Maid man = characterMgr.GetMan(j);
- if (man != null && man.Visible && man.IsBusy)
- {
- return true;
- }
- }
- return false;
- }
- public void ResetWorld()
- {
- GameMain.Instance.BgMgr.DelPrefabFromBgAll();
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(i);
- if (stockMaid != null && stockMaid.body0 != null && stockMaid.body0.isLoadedBody)
- {
- stockMaid.body0.MuneYureL(1f);
- stockMaid.body0.MuneYureR(1f);
- stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
- stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
- TBodySkin tbodySkin = stockMaid.body0.goSlot[0];
- if (tbodySkin != null && tbodySkin.kupaCtrl != null)
- {
- tbodySkin.kupaCtrl.ResetAll();
- }
- }
- }
- for (int j = 0; j < characterMgr.GetStockManCount(); j++)
- {
- Maid stockMan = characterMgr.GetStockMan(j);
- if (stockMan != null && stockMan.body0 != null && stockMan.body0.isLoadedBody)
- {
- stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
- stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, IKCtrlData.IKExecTiming.Normal);
- TBodySkin tbodySkin2 = this.maid.body0.goSlot[0];
- if (tbodySkin2 != null && tbodySkin2.kupaCtrl != null)
- {
- tbodySkin2.kupaCtrl.ResetAll();
- }
- }
- }
- string[] array = new string[]
- {
- "handitem",
- "kousoku_upper",
- "kousoku_lower",
- "acchead",
- "megane",
- "skirt",
- "panz",
- "mizugi",
- "onepiece",
- "accanl",
- "accvag",
- "KubiScl",
- "UdeScl",
- "DouPer",
- "sintyou",
- "kata"
- };
- for (int k = 0; k < characterMgr.GetMaidCount(); k++)
- {
- Maid maid = characterMgr.GetMaid(k);
- if (maid != null && maid.Visible)
- {
- maid.FaceAnime("通常", 0f, 0);
- maid.FaceBlend("無し");
- maid.OpenMouth(false);
- maid.DelPrefabAll();
- for (int l = 0; l < array.Length; l++)
- {
- maid.ResetProp(array[l], true);
- }
- maid.AllProcPropSeqStart();
- }
- }
- for (int m = 0; m < characterMgr.GetManCount(); m++)
- {
- Maid man = characterMgr.GetMan(m);
- if (man != null && man.Visible)
- {
- man.DelPrefabAll();
- for (int n = 0; n < array.Length; n++)
- {
- man.ResetProp(array[n], false);
- }
- man.AllProcPropSeqStart();
- }
- }
- }
- public void UnVisibleMaidAndMan(bool maid_unvisible, bool man_unvisible)
- {
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- if (man_unvisible)
- {
- for (int i = 0; i < characterMgr.GetManCount(); i++)
- {
- Maid man = characterMgr.GetMan(i);
- if (man != null)
- {
- man.Visible = false;
- }
- }
- }
- if (maid_unvisible)
- {
- for (int j = 0; j < characterMgr.GetMaidCount(); j++)
- {
- Maid maid = characterMgr.GetMaid(j);
- if (maid != null)
- {
- maid.Visible = false;
- }
- }
- }
- }
- public void ApplyStatus()
- {
- int exp = 0;
- for (int i = 0; i < this.play_skill_array.Length; i++)
- {
- Skill.Data base_data = this.play_skill_array[i].skill_pair.base_data;
- if (base_data != null)
- {
- if (this.play_skill_array[i].is_play && this.maid_.status.yotogiSkill.datas.ContainsKey(base_data.id))
- {
- YotogiSkillData yotogiSkillData = this.maid_.status.yotogiSkill.Get(base_data.id);
- yotogiSkillData.playCount += 1u;
- yotogiSkillData.expSystem.AddExp(this.play_skill_array[i].exp);
- string flagName = "夜伽_カテゴリー_実行回数_" + base_data.category.ToString();
- int flag = this.maid_.status.GetFlag(flagName);
- this.maid_.status.SetFlag(flagName, flag + 1);
- }
- this.play_skill_array[i].exp = 0;
- }
- }
- this.maid_.status.playCountYotogi++;
- if (!this.maid_.status.enabledYotogiStatusLock)
- {
- this.maid_.status.selectedYotogiClass.expSystem.AddExp(exp);
- this.maid_.status.studyRate += -50;
- }
- List<YotogiClass.Data> learnPossibleClassDatas = this.maid.status.yotogiClass.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
- foreach (YotogiClass.Data data in learnPossibleClassDatas)
- {
- this.maid.status.yotogiClass.Add(data, true, true);
- }
- this.maid.status.UpdateClassBonusStatus();
- List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this.maid_.status);
- foreach (Skill.Data data2 in learnPossibleSkills)
- {
- this.maid_.status.yotogiSkill.Add(data2.id);
- }
- foreach (int id in this.acquired_propensityid_list)
- {
- Propensity.Data data3 = Propensity.GetData(id);
- this.maid_.status.AddPropensity(data3);
- }
- }
- public void SetRepeatVoiceFile(string file_name, int maid_no)
- {
- this.play_mgr_.SetRepeatVoiceFile(file_name, maid_no);
- }
- public void AddRepeatVoiceFile(string file_name, int maid_no)
- {
- this.play_mgr_.AddRepeatVoiceFile(file_name, maid_no);
- }
- public void OnChangeSeikeiken()
- {
- }
- public void DebugOnClickCallStageSelect()
- {
- this.null_mgr_.SetNextLabel(string.Empty);
- this.CallScreen(YotogiManager.CallScreenType.StageSelect.ToString());
- }
- public void DebugOnClickCallSkillSelect()
- {
- this.null_mgr_.SetNextLabel(string.Empty);
- this.CreateBackUpStatus();
- this.CallScreen(YotogiManager.CallScreenType.SkillSelect.ToString());
- }
- public void DebugOnClickCallPlay()
- {
- this.null_mgr_.SetNextLabel(string.Empty);
- this.CallScreen(YotogiManager.CallScreenType.Play.ToString());
- }
- public void DebugOnClickCallResult()
- {
- this.null_mgr_.SetNextLabel(string.Empty);
- this.CallScreen(YotogiManager.CallScreenType.Result.ToString());
- }
- public void DebugOnClickCallCharaSelect()
- {
- this.null_mgr_.SetNextLabel(string.Empty);
- this.CallScreen(YotogiManager.CallScreenType.SubCharaSelect.ToString());
- }
- public void DebugOnClickNewScene()
- {
- this.CallScreen(YotogiManager.CallScreenType.FreeSkillSelect.ToString());
- }
- public bool IsCallShouldSubCharaSelect()
- {
- List<int> list = new List<int>();
- HashSet<int> hashSet = new HashSet<int>();
- if (this.is_free_mode)
- {
- int[] keyArray = this.maid.status.yotogiSkill.datas.GetKeyArray();
- for (int i = 0; i < keyArray.Length; i++)
- {
- Skill.Data data = Skill.Get(keyArray[i]);
- if (data.specialConditionType != Skill.Data.SpecialConditionType.NewType && data.specialConditionType != Skill.Data.SpecialConditionType.GP01Recollect)
- {
- if (!hashSet.Contains(data.player_num))
- {
- hashSet.Add(data.player_num);
- list.Add(data.player_num);
- }
- }
- }
- }
- else
- {
- if (this.play_skill_array == null)
- {
- return false;
- }
- for (int j = 0; j < this.play_skill_array.Length; j++)
- {
- if (this.play_skill_array[j] != null && this.play_skill_array[j].skill_pair.base_data != null)
- {
- if (!hashSet.Contains(this.play_skill_array[j].skill_pair.base_data.player_num))
- {
- hashSet.Add(this.play_skill_array[j].skill_pair.base_data.player_num);
- list.Add(this.play_skill_array[j].skill_pair.base_data.player_num);
- }
- }
- }
- }
- list.Sort();
- int playPossibleMaidCount = this.GetPlayPossibleMaidCount();
- int num = 0;
- for (int k = 0; k < list.Count; k++)
- {
- if (list[k] <= playPossibleMaidCount)
- {
- num = list[k];
- }
- }
- return 1 < num;
- }
- public bool inputCBLUpKey
- {
- get
- {
- return false;
- }
- }
- public bool inputCBLDownKey
- {
- get
- {
- return false;
- }
- }
- public bool inputCBLRightKey
- {
- get
- {
- return false;
- }
- }
- public bool inputCBLLeftKey
- {
- get
- {
- return false;
- }
- }
- public bool inputCBLEnterKey
- {
- get
- {
- return false;
- }
- }
- public bool inputCBLCancelKey
- {
- get
- {
- return false;
- }
- }
- public int GetPlayPossibleMaidCount()
- {
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- int num = 0;
- if (this.is_script_call_ && !this.is_free_mode)
- {
- num = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime).Count;
- if (num == 0)
- {
- num = 1;
- }
- }
- else
- {
- for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(i);
- if (stockMaid != null && stockMaid.status.heroineType != HeroineType.Sub)
- {
- num++;
- }
- }
- }
- return num;
- }
- public void GetSubMaidList(List<Maid> draw_list)
- {
- if (draw_list == null)
- {
- return;
- }
- List<Maid> list = new List<Maid>();
- CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
- if (this.is_script_call_ && !this.is_free_mode)
- {
- List<Maid> yotogiMaids = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
- for (int i = 0; i < yotogiMaids.Count; i++)
- {
- if (yotogiMaids[i] != this.maid_)
- {
- list.Add(yotogiMaids[i]);
- }
- }
- }
- else
- {
- for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
- {
- Maid stockMaid = characterMgr.GetStockMaid(j);
- if (stockMaid != null && this.maid_ != stockMaid && stockMaid.status.heroineType != HeroineType.Sub)
- {
- list.Add(stockMaid);
- }
- }
- }
- draw_list.Clear();
- draw_list.AddRange(list);
- }
- public YotogiManager.BackUpStatus GetBackUpStatus()
- {
- return this.backup_status_;
- }
- public Maid maid
- {
- get
- {
- return this.maid_;
- }
- }
- public int skill_select_max_hp
- {
- get
- {
- return this.maid_.status.maxHp;
- }
- }
- public YotogiManager.PlayingSkillData[] play_skill_array
- {
- get
- {
- return this.play_skill_array_;
- }
- }
- public YotogiNullManager null_mgr
- {
- get
- {
- return this.null_mgr_;
- }
- }
- public YotogiKagManager yotogi_kag
- {
- get
- {
- return this.yotogi_kag_;
- }
- }
- public bool is_free_mode
- {
- get
- {
- return this.is_free_mode_;
- }
- set
- {
- this.is_free_mode_ = value;
- }
- }
- public bool is_new_yotogi_mode
- {
- get
- {
- return this.is_new_yotogi_;
- }
- }
- public int fix_skill_level
- {
- get
- {
- return this.fix_skill_level_;
- }
- set
- {
- this.fix_skill_level_ = wf.Math.RoundMinMax(value, 0, 3);
- }
- }
- public bool is_vr_mode
- {
- get
- {
- return this.is_vr_mode_;
- }
- }
- public YotogiCommandMenuOVR command_menu
- {
- get
- {
- return this.command_menu_;
- }
- }
- public GameObject skill_select_prefab_object
- {
- get
- {
- return this.free_skill_select_mgr_.skill_select_prefab_object;
- }
- }
- public static YotogiManager instans { get; private set; }
- public YotogiPlayManager play_mgr
- {
- get
- {
- return this.play_mgr_;
- }
- }
- public static bool isGP001HaremMode
- {
- get
- {
- return GameMain.Instance.CMSystem.GetTmpGenericFlag("harem_maidswap") != 0;
- }
- }
- public void AddDebugLog(string text)
- {
- }
- public HashSet<int> acquired_propensityid_list = new HashSet<int>();
- private Maid maid_;
- private List<Maid> sub_maid_list_ = new List<Maid>();
- private ADVKagManager adv_kag_;
- private YotogiKagManager yotogi_kag_;
- private YotogiNullManager null_mgr_;
- private YotogiStageSelectManager stage_select_mgr_;
- private YotogiSkillSelectManager skill_select_mgr_;
- private YotogiPlayManager play_mgr_;
- private YotogiResultManager result_mgr_;
- private YotogiSubCharacterSelectManager sub_chara_select_mgr_;
- private bool is_script_call_;
- private bool is_free_mode_;
- private bool is_new_yotogi_;
- private int fix_skill_level_;
- private YotogiFreeSkillSelectManager free_skill_select_mgr_;
- private bool is_vr_mode_;
- private YotogiCommandMenuOVR command_menu_;
- private YotogiManager.PlayingSkillData[] play_skill_array_ = new YotogiManager.PlayingSkillData[7];
- private YotogiManager.BackUpStatus backup_status_ = default(YotogiManager.BackUpStatus);
- public HashSet<string> addTagNames = new HashSet<string>();
- public enum CallScreenType
- {
- Null,
- Init,
- StageSelect,
- SkillSelect,
- Play,
- Result,
- SubCharaSelect,
- FreeSkillSelect
- }
- public class PlayingSkillData
- {
- public Yotogi.SkillDataPair skill_pair = new Yotogi.SkillDataPair();
- public int exp;
- public int backup_total_exp;
- public bool is_play;
- }
- public struct BackUpStatus
- {
- public YotogiPlay.Param param;
- public HashSet<int> skill_id_list;
- public HashSet<int> propensity;
- public HashSet<int> yotogi_class_list;
- }
- }
|