123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014 |
- 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 && data.specialConditionType != Skill.Data.SpecialConditionType.GP02Recollect)
- {
- 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 YotogiManager.PlayingSkillData playing_skill
- {
- get
- {
- return this.play_mgr_.playingSkill;
- }
- }
- 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;
- }
- }
|