YotogiManager.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. using System;
  2. using System.Collections.Generic;
  3. using MaidStatus;
  4. using MaidStatus.CsvData;
  5. using Schedule;
  6. using UnityEngine;
  7. using wf;
  8. using Yotogis;
  9. public class YotogiManager : WfScreenManager
  10. {
  11. public void Awake()
  12. {
  13. YotogiStage.CreateData();
  14. YotogiManager.instans = this;
  15. this.play_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiPlayManager", false).GetComponent<YotogiPlayManager>();
  16. this.skill_select_mgr_ = UTY.GetChildObject(base.gameObject, "SkillSelectManager", false).GetComponent<YotogiSkillSelectManager>();
  17. this.result_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiResultManager", false).GetComponent<YotogiResultManager>();
  18. this.free_skill_select_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiFreeSkillSelectManager", false).GetComponent<YotogiFreeSkillSelectManager>();
  19. this.stage_select_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiStageSelectManager", false).GetComponent<YotogiStageSelectManager>();
  20. this.sub_chara_select_mgr_ = UTY.GetChildObject(base.gameObject, "SubCharacterSelectManager", false).GetComponent<YotogiSubCharacterSelectManager>();
  21. this.null_mgr_ = UTY.GetChildObject(base.gameObject, "YotogiNullManager", false).GetComponent<YotogiNullManager>();
  22. for (int i = 0; i < this.play_skill_array_.Length; i++)
  23. {
  24. this.play_skill_array_[i] = new YotogiManager.PlayingSkillData();
  25. }
  26. this.adv_kag_ = GameMain.Instance.ScriptMgr.adv_kag;
  27. this.yotogi_kag_ = GameMain.Instance.ScriptMgr.yotogi_kag;
  28. this.adv_kag_.kag.AddTagCallBack("yotogicall", new KagScript.KagTagCallBack(this.TagYotogiCall));
  29. this.yotogi_kag_.kag.AddTagCallBack("playbgmroom", new KagScript.KagTagCallBack(this.TagPlayBGMRoom));
  30. this.yotogi_kag_.kag.AddTagCallBack("controlmask", new KagScript.KagTagCallBack(this.TagControlMask));
  31. this.yotogi_kag_.enabled = false;
  32. }
  33. public override void Start()
  34. {
  35. base.Start();
  36. this.maid_ = GameMain.Instance.CharacterMgr.GetMaid(0);
  37. this.backup_status_.skill_id_list = new HashSet<int>();
  38. this.backup_status_.yotogi_class_list = new HashSet<int>();
  39. this.CreateBackUpStatus();
  40. GameMain.Instance.ScriptMgr.yotogi_kag.SetYotogiManager(this);
  41. string b = "SceneYotogi";
  42. if (this.adv_kag_.tag_backup.ContainsKey("free_start"))
  43. {
  44. this.is_free_mode_ = true;
  45. }
  46. else
  47. {
  48. this.is_free_mode_ = false;
  49. }
  50. this.is_vr_mode_ = this.adv_kag_.tag_backup.ContainsKey("vr_mode");
  51. if (GameMain.Instance.VRMode)
  52. {
  53. this.command_menu_ = Utility.CreatePrefab(null, "SceneYotogi/Yotogi/Prefab/VRUI CommandMenu", true).GetComponent<YotogiCommandMenuOVR>();
  54. this.command_menu_.transform.SetParent(base.gameObject.transform, true);
  55. this.command_menu_.visible = false;
  56. }
  57. this.is_script_call_ = false;
  58. if (this.adv_kag_.tag_backup != null && 0 < this.adv_kag_.tag_backup.Count && this.adv_kag_.tag_backup["name"] == b)
  59. {
  60. this.is_script_call_ = true;
  61. NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("start"), "SceneCallにstartの設定がされていませんでした");
  62. NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("label"), "SceneCallにlabelの設定がされていませんでした");
  63. string text = this.adv_kag_.tag_backup["start"];
  64. YotogiManager.CallScreenType callScreenType = YotogiManager.CallScreenType.Null;
  65. try
  66. {
  67. callScreenType = (YotogiManager.CallScreenType)Enum.Parse(typeof(YotogiManager.CallScreenType), text);
  68. }
  69. catch
  70. {
  71. NDebug.Assert("[" + text + "]を特定できませんでした", false);
  72. }
  73. if ((callScreenType == YotogiManager.CallScreenType.SubCharaSelect || callScreenType == YotogiManager.CallScreenType.FreeSkillSelect) && this.adv_kag_.tag_backup.ContainsKey("cancel_label"))
  74. {
  75. YotogiFreeSkillSelectManager yotogiFreeSkillSelectManager = this.free_skill_select_mgr_;
  76. string cancel_label = this.adv_kag_.tag_backup["cancel_label"];
  77. this.sub_chara_select_mgr_.cancel_label = cancel_label;
  78. yotogiFreeSkillSelectManager.cancel_label = cancel_label;
  79. }
  80. string nextLabel = this.adv_kag_.tag_backup["label"];
  81. this.null_mgr_.SetNextLabel(nextLabel);
  82. if (callScreenType == YotogiManager.CallScreenType.SkillSelect && this.adv_kag_.tag_backup.ContainsKey("edit_label"))
  83. {
  84. this.skill_select_mgr_.SetEditNextLabel(this.adv_kag_.tag_backup["edit_label"]);
  85. }
  86. this.CallScreen(text);
  87. }
  88. else if (this.is_free_mode)
  89. {
  90. this.CallScreen(YotogiManager.CallScreenType.FreeSkillSelect.ToString());
  91. }
  92. else
  93. {
  94. this.CallScreen(YotogiManager.CallScreenType.StageSelect.ToString());
  95. }
  96. }
  97. public override void Update()
  98. {
  99. base.Update();
  100. }
  101. public void OnPreFinalize()
  102. {
  103. this.adv_kag_ = null;
  104. this.yotogi_kag_ = null;
  105. }
  106. public void OnDestroy()
  107. {
  108. YotogiManager.instans = null;
  109. if (this.adv_kag_ != null)
  110. {
  111. if (this.adv_kag_.kag != null)
  112. {
  113. this.adv_kag_.kag.RemoveTagCallBack("yotogicall");
  114. }
  115. this.adv_kag_ = null;
  116. if (this.yotogi_kag_.kag != null)
  117. {
  118. this.yotogi_kag_.kag.RemoveTagCallBack("playbgmroom");
  119. this.yotogi_kag_.kag.RemoveTagCallBack("controlmask");
  120. }
  121. this.yotogi_kag_ = null;
  122. }
  123. }
  124. public bool TagYotogiCall(KagTagSupport tag_data)
  125. {
  126. this.adv_kag_.CheckAbsolutelyNecessaryTag(tag_data, "yotogicall", new string[]
  127. {
  128. "name",
  129. "label"
  130. });
  131. string text = tag_data.GetTagProperty("name").AsString();
  132. YotogiManager.CallScreenType callScreenType = YotogiManager.CallScreenType.Null;
  133. try
  134. {
  135. callScreenType = (YotogiManager.CallScreenType)Enum.Parse(typeof(YotogiManager.CallScreenType), text);
  136. }
  137. catch
  138. {
  139. NDebug.Assert("@yotogicall : [" + text + "]を特定できませんでした", false);
  140. }
  141. if ((callScreenType == YotogiManager.CallScreenType.SubCharaSelect || callScreenType == YotogiManager.CallScreenType.FreeSkillSelect) && tag_data.IsValid("cancel_label"))
  142. {
  143. YotogiFreeSkillSelectManager yotogiFreeSkillSelectManager = this.free_skill_select_mgr_;
  144. string cancel_label = tag_data.GetTagProperty("cancel_label").AsString();
  145. this.sub_chara_select_mgr_.cancel_label = cancel_label;
  146. yotogiFreeSkillSelectManager.cancel_label = cancel_label;
  147. }
  148. this.null_mgr_.SetNextLabel(tag_data.GetTagProperty("label").AsString());
  149. if (callScreenType == YotogiManager.CallScreenType.SkillSelect && tag_data.IsValid("edit_label"))
  150. {
  151. this.skill_select_mgr_.SetEditNextLabel(tag_data.GetTagProperty("edit_label").AsString());
  152. }
  153. this.CallScreen(text);
  154. return false;
  155. }
  156. public bool TagPlayBGMRoom(KagTagSupport tag_data)
  157. {
  158. List<YotogiStage.Data> allDatas = YotogiStage.GetAllDatas(false);
  159. YotogiStage.Data data = null;
  160. foreach (YotogiStage.Data data2 in allDatas)
  161. {
  162. if (YotogiStageSelectManager.SelectedStage == data2)
  163. {
  164. data = data2;
  165. break;
  166. }
  167. }
  168. if (data == null)
  169. {
  170. Debug.LogError("@playbgmroomエラー prefab名[" + YotogiStageSelectManager.SelectedStage.drawName + "]から背景データを特定できませんでした");
  171. return false;
  172. }
  173. int millisecond = 0;
  174. if (tag_data.IsValid("fade"))
  175. {
  176. millisecond = tag_data.GetTagProperty("fade").AsInteger();
  177. }
  178. GameMain.Instance.SoundMgr.PlayBGM(data.bgmFileName, GameUty.MillisecondToSecond(millisecond), true);
  179. return false;
  180. }
  181. public bool TagControlMask(KagTagSupport tag_data)
  182. {
  183. if (base.cur_call_screen_name == "Play" && this.play_mgr_ != null)
  184. {
  185. this.play_mgr_.SetControlMask(true, false);
  186. }
  187. return false;
  188. }
  189. protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> children_dic)
  190. {
  191. children_dic.Add(YotogiManager.CallScreenType.SkillSelect.ToString(), this.skill_select_mgr_);
  192. children_dic.Add(YotogiManager.CallScreenType.Result.ToString(), this.result_mgr_);
  193. children_dic.Add(YotogiManager.CallScreenType.FreeSkillSelect.ToString(), this.free_skill_select_mgr_);
  194. children_dic.Add(YotogiManager.CallScreenType.StageSelect.ToString(), this.stage_select_mgr_);
  195. children_dic.Add(YotogiManager.CallScreenType.Play.ToString(), this.play_mgr_);
  196. children_dic.Add(YotogiManager.CallScreenType.SubCharaSelect.ToString(), this.sub_chara_select_mgr_);
  197. children_dic.Add(YotogiManager.CallScreenType.Null.ToString(), this.null_mgr_);
  198. }
  199. public void CreateBackUpStatus()
  200. {
  201. if (this.maid_ == null)
  202. {
  203. return;
  204. }
  205. this.backup_status_.param = YotogiPlay.Param.Create(this.maid_);
  206. this.backup_status_.propensity = new HashSet<int>(this.maid_.status.propensitys.GetKeyArray());
  207. }
  208. public void CreateBackUpSkillID()
  209. {
  210. if (this.maid_ == null)
  211. {
  212. return;
  213. }
  214. this.backup_status_.skill_id_list = new HashSet<int>(this.maid_.status.yotogiSkill.datas.GetKeyArray());
  215. }
  216. public void CreateBackUpYotogiClass()
  217. {
  218. this.backup_status_.yotogi_class_list = new HashSet<int>(this.maid_.status.yotogiClass.datas.GetKeyArray());
  219. }
  220. public void SetPlaySkillArray(KeyValuePair<Skill.Data, bool>[] skill_array)
  221. {
  222. this.play_skill_array_ = new YotogiManager.PlayingSkillData[7];
  223. for (int i = 0; i < this.play_skill_array_.Length; i++)
  224. {
  225. this.play_skill_array_[i] = new YotogiManager.PlayingSkillData();
  226. this.play_skill_array_[i].exp = 0;
  227. this.play_skill_array_[i].backup_total_exp = 0;
  228. this.play_skill_array_[i].is_play = false;
  229. if (i < skill_array.Length)
  230. {
  231. Skill.Data key = skill_array[i].Key;
  232. bool value = skill_array[i].Value;
  233. if (this.is_free_mode || this.is_vr_mode)
  234. {
  235. this.play_skill_array_[i].skill_pair = Yotogi.SkillDataPair.CreateBaseDataOnly(this.maid_, key);
  236. }
  237. else
  238. {
  239. this.play_skill_array_[i].skill_pair = Yotogi.SkillDataPair.Create(this.maid_, key);
  240. this.play_skill_array_[i].skill_pair.lock_skill_exp = value;
  241. this.play_skill_array_[i].backup_total_exp = this.play_skill_array_[i].skill_pair.skill_data.expSystem.GetTotalExp();
  242. }
  243. }
  244. else
  245. {
  246. this.play_skill_array_[i].skill_pair.base_data = null;
  247. }
  248. }
  249. }
  250. public void AddPlaySkill(Skill.Data skillData)
  251. {
  252. YotogiManager.PlayingSkillData[] array = this.play_skill_array_;
  253. this.play_skill_array_ = new YotogiManager.PlayingSkillData[this.play_skill_array_.Length + 1];
  254. for (int i = 0; i < array.Length; i++)
  255. {
  256. this.play_skill_array_[i] = array[i];
  257. }
  258. YotogiManager.PlayingSkillData playingSkillData = new YotogiManager.PlayingSkillData();
  259. playingSkillData.exp = 0;
  260. playingSkillData.backup_total_exp = 0;
  261. playingSkillData.is_play = false;
  262. playingSkillData.skill_pair = Yotogi.SkillDataPair.Create(this.maid_, skillData);
  263. playingSkillData.skill_pair.lock_skill_exp = true;
  264. playingSkillData.backup_total_exp = playingSkillData.skill_pair.skill_data.expSystem.GetTotalExp();
  265. this.play_skill_array_[this.play_skill_array_.Length - 1] = playingSkillData;
  266. }
  267. public bool IsAllCharaBusy()
  268. {
  269. bool flag = false;
  270. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  271. for (int i = 0; i < characterMgr.GetMaidCount(); i++)
  272. {
  273. Maid maid = characterMgr.GetMaid(i);
  274. if (maid != null && maid.Visible && maid.IsBusy)
  275. {
  276. flag = true;
  277. break;
  278. }
  279. }
  280. if (flag)
  281. {
  282. return flag;
  283. }
  284. for (int j = 0; j < characterMgr.GetManCount(); j++)
  285. {
  286. Maid man = characterMgr.GetMan(j);
  287. if (man != null && man.Visible && man.IsBusy)
  288. {
  289. flag = true;
  290. break;
  291. }
  292. }
  293. return flag;
  294. }
  295. public void ResetWorld()
  296. {
  297. GameMain.Instance.BgMgr.DelPrefabFromBgAll();
  298. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  299. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  300. {
  301. Maid stockMaid = characterMgr.GetStockMaid(i);
  302. if (stockMaid != null && stockMaid.body0 != null && stockMaid.body0.isLoadedBody)
  303. {
  304. stockMaid.body0.MuneYureL(1f);
  305. stockMaid.body0.MuneYureR(1f);
  306. stockMaid.IKTargetToBone("左手", null, "無し", Vector3.zero, IKMgrData.IKAttachType.Point, false);
  307. stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKMgrData.IKAttachType.Point, false);
  308. }
  309. }
  310. for (int j = 0; j < characterMgr.GetStockManCount(); j++)
  311. {
  312. Maid stockMan = characterMgr.GetStockMan(j);
  313. if (stockMan != null && stockMan.body0 != null && stockMan.body0.isLoadedBody)
  314. {
  315. stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKMgrData.IKAttachType.Point, false);
  316. stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKMgrData.IKAttachType.Point, false);
  317. }
  318. }
  319. string[] array = new string[]
  320. {
  321. "handitem",
  322. "kousoku_upper",
  323. "kousoku_lower",
  324. "acchead",
  325. "megane",
  326. "skirt",
  327. "panz",
  328. "mizugi",
  329. "onepiece",
  330. "accanl",
  331. "accvag",
  332. "KubiScl",
  333. "UdeScl",
  334. "DouPer",
  335. "sintyou",
  336. "kata"
  337. };
  338. for (int k = 0; k < characterMgr.GetMaidCount(); k++)
  339. {
  340. Maid maid = characterMgr.GetMaid(k);
  341. if (maid != null && maid.Visible)
  342. {
  343. maid.FaceAnime("通常", 0f, 0);
  344. maid.FaceBlend("無し");
  345. maid.OpenMouth(false);
  346. maid.DelPrefabAll();
  347. for (int l = 0; l < array.Length; l++)
  348. {
  349. maid.ResetProp(array[l], true);
  350. }
  351. maid.AllProcPropSeqStart();
  352. }
  353. }
  354. for (int m = 0; m < characterMgr.GetManCount(); m++)
  355. {
  356. Maid man = characterMgr.GetMan(m);
  357. if (man != null && man.Visible)
  358. {
  359. man.DelPrefabAll();
  360. for (int n = 0; n < array.Length; n++)
  361. {
  362. man.ResetProp(array[n], false);
  363. }
  364. man.AllProcPropSeqStart();
  365. }
  366. }
  367. }
  368. public void UnVisibleMaidAndMan(bool maid_unvisible, bool man_unvisible)
  369. {
  370. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  371. if (man_unvisible)
  372. {
  373. for (int i = 0; i < characterMgr.GetManCount(); i++)
  374. {
  375. Maid man = characterMgr.GetMan(i);
  376. if (man != null)
  377. {
  378. man.Visible = false;
  379. }
  380. }
  381. }
  382. if (maid_unvisible)
  383. {
  384. for (int j = 0; j < characterMgr.GetMaidCount(); j++)
  385. {
  386. Maid maid = characterMgr.GetMaid(j);
  387. if (maid != null)
  388. {
  389. maid.Visible = false;
  390. }
  391. }
  392. }
  393. }
  394. public void ApplyStatus()
  395. {
  396. int exp = 0;
  397. for (int i = 0; i < this.play_skill_array.Length; i++)
  398. {
  399. Skill.Data base_data = this.play_skill_array[i].skill_pair.base_data;
  400. if (base_data != null)
  401. {
  402. if (this.play_skill_array[i].is_play && this.maid_.status.yotogiSkill.datas.ContainsKey(base_data.id))
  403. {
  404. YotogiSkillData yotogiSkillData = this.maid_.status.yotogiSkill.Get(base_data.id);
  405. yotogiSkillData.playCount += 1u;
  406. yotogiSkillData.expSystem.AddExp(this.play_skill_array[i].exp);
  407. string flagName = "夜伽_カテゴリー_実行回数_" + base_data.category.ToString();
  408. int flag = this.maid_.status.GetFlag(flagName);
  409. this.maid_.status.SetFlag(flagName, flag + 1);
  410. }
  411. this.play_skill_array[i].exp = 0;
  412. }
  413. }
  414. this.maid_.status.playCountYotogi++;
  415. if (!this.maid_.status.enabledYotogiStatusLock)
  416. {
  417. this.maid_.status.selectedYotogiClass.expSystem.AddExp(exp);
  418. this.maid_.status.studyRate += -50;
  419. }
  420. List<YotogiClass.Data> learnPossibleClassDatas = this.maid.status.yotogiClass.GetLearnPossibleClassDatas(true, AbstractClassData.ClassType.Share | AbstractClassData.ClassType.New);
  421. foreach (YotogiClass.Data data in learnPossibleClassDatas)
  422. {
  423. this.maid.status.yotogiClass.Add(data, true, true);
  424. }
  425. this.maid.status.UpdateClassBonusStatus();
  426. List<Skill.Data> learnPossibleSkills = Skill.GetLearnPossibleSkills(this.maid_.status);
  427. foreach (Skill.Data data2 in learnPossibleSkills)
  428. {
  429. this.maid_.status.yotogiSkill.Add(data2.id);
  430. }
  431. foreach (int id in this.acquired_propensityid_list)
  432. {
  433. Propensity.Data data3 = Propensity.GetData(id);
  434. this.maid_.status.AddPropensity(data3);
  435. }
  436. }
  437. public void SetRepeatVoiceFile(string file_name, int maid_no)
  438. {
  439. this.play_mgr_.SetRepeatVoiceFile(file_name, maid_no);
  440. }
  441. public void AddRepeatVoiceFile(string file_name, int maid_no)
  442. {
  443. this.play_mgr_.AddRepeatVoiceFile(file_name, maid_no);
  444. }
  445. public void OnChangeSeikeiken()
  446. {
  447. }
  448. public void DebugOnClickCallStageSelect()
  449. {
  450. this.null_mgr_.SetNextLabel(string.Empty);
  451. this.CallScreen(YotogiManager.CallScreenType.StageSelect.ToString());
  452. }
  453. public void DebugOnClickCallSkillSelect()
  454. {
  455. this.null_mgr_.SetNextLabel(string.Empty);
  456. this.CreateBackUpStatus();
  457. this.CallScreen(YotogiManager.CallScreenType.SkillSelect.ToString());
  458. }
  459. public void DebugOnClickCallPlay()
  460. {
  461. this.null_mgr_.SetNextLabel(string.Empty);
  462. this.CallScreen(YotogiManager.CallScreenType.Play.ToString());
  463. }
  464. public void DebugOnClickCallResult()
  465. {
  466. this.null_mgr_.SetNextLabel(string.Empty);
  467. this.CallScreen(YotogiManager.CallScreenType.Result.ToString());
  468. }
  469. public void DebugOnClickCallCharaSelect()
  470. {
  471. this.null_mgr_.SetNextLabel(string.Empty);
  472. this.CallScreen(YotogiManager.CallScreenType.SubCharaSelect.ToString());
  473. }
  474. public void DebugOnClickNewScene()
  475. {
  476. this.CallScreen(YotogiManager.CallScreenType.FreeSkillSelect.ToString());
  477. }
  478. public bool IsCallShouldSubCharaSelect()
  479. {
  480. List<int> list = new List<int>();
  481. HashSet<int> hashSet = new HashSet<int>();
  482. if (this.is_free_mode)
  483. {
  484. int[] keyArray = this.maid.status.yotogiSkill.datas.GetKeyArray();
  485. for (int i = 0; i < keyArray.Length; i++)
  486. {
  487. Skill.Data data = Skill.Get(keyArray[i]);
  488. if (!hashSet.Contains(data.player_num))
  489. {
  490. hashSet.Add(data.player_num);
  491. list.Add(data.player_num);
  492. }
  493. }
  494. }
  495. else
  496. {
  497. if (this.play_skill_array == null)
  498. {
  499. return false;
  500. }
  501. for (int j = 0; j < this.play_skill_array.Length; j++)
  502. {
  503. if (this.play_skill_array[j] != null && this.play_skill_array[j].skill_pair.base_data != null)
  504. {
  505. if (!hashSet.Contains(this.play_skill_array[j].skill_pair.base_data.player_num))
  506. {
  507. hashSet.Add(this.play_skill_array[j].skill_pair.base_data.player_num);
  508. list.Add(this.play_skill_array[j].skill_pair.base_data.player_num);
  509. }
  510. }
  511. }
  512. }
  513. list.Sort();
  514. int playPossibleMaidCount = this.GetPlayPossibleMaidCount();
  515. int num = 0;
  516. for (int k = 0; k < list.Count; k++)
  517. {
  518. if (list[k] <= playPossibleMaidCount)
  519. {
  520. num = list[k];
  521. }
  522. }
  523. return 1 < num;
  524. }
  525. public bool inputCBLUpKey
  526. {
  527. get
  528. {
  529. GameMain.Instance.MainCamera.IsFadeOut();
  530. return false;
  531. }
  532. }
  533. public bool inputCBLDownKey
  534. {
  535. get
  536. {
  537. GameMain.Instance.MainCamera.IsFadeOut();
  538. return false;
  539. }
  540. }
  541. public bool inputCBLRightKey
  542. {
  543. get
  544. {
  545. GameMain.Instance.MainCamera.IsFadeOut();
  546. return false;
  547. }
  548. }
  549. public bool inputCBLLeftKey
  550. {
  551. get
  552. {
  553. GameMain.Instance.MainCamera.IsFadeOut();
  554. return false;
  555. }
  556. }
  557. public bool inputCBLEnterKey
  558. {
  559. get
  560. {
  561. GameMain.Instance.MainCamera.IsFadeOut();
  562. return false;
  563. }
  564. }
  565. public bool inputCBLCancelKey
  566. {
  567. get
  568. {
  569. GameMain.Instance.MainCamera.IsFadeOut();
  570. return false;
  571. }
  572. }
  573. public int GetPlayPossibleMaidCount()
  574. {
  575. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  576. int num = 0;
  577. if (this.is_script_call_ && !this.is_free_mode)
  578. {
  579. num = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime).Count;
  580. if (num == 0)
  581. {
  582. num = 1;
  583. }
  584. }
  585. else
  586. {
  587. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  588. {
  589. Maid stockMaid = characterMgr.GetStockMaid(i);
  590. if (stockMaid != null && stockMaid.status.heroineType != HeroineType.Sub)
  591. {
  592. num++;
  593. }
  594. }
  595. }
  596. return num;
  597. }
  598. public void GetSubMaidList(List<Maid> draw_list)
  599. {
  600. if (draw_list == null)
  601. {
  602. return;
  603. }
  604. List<Maid> list = new List<Maid>();
  605. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  606. if (this.is_script_call_ && !this.is_free_mode)
  607. {
  608. List<Maid> yotogiMaids = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
  609. for (int i = 0; i < yotogiMaids.Count; i++)
  610. {
  611. if (yotogiMaids[i] != this.maid_)
  612. {
  613. list.Add(yotogiMaids[i]);
  614. }
  615. }
  616. }
  617. else
  618. {
  619. for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
  620. {
  621. Maid stockMaid = characterMgr.GetStockMaid(j);
  622. if (stockMaid != null && this.maid_ != stockMaid && stockMaid.status.heroineType != HeroineType.Sub)
  623. {
  624. list.Add(stockMaid);
  625. }
  626. }
  627. }
  628. draw_list.Clear();
  629. draw_list.AddRange(list);
  630. }
  631. public YotogiManager.BackUpStatus GetBackUpStatus()
  632. {
  633. return this.backup_status_;
  634. }
  635. public Maid maid
  636. {
  637. get
  638. {
  639. return this.maid_;
  640. }
  641. }
  642. public int skill_select_max_hp
  643. {
  644. get
  645. {
  646. return this.maid_.status.maxHp;
  647. }
  648. }
  649. public YotogiManager.PlayingSkillData[] play_skill_array
  650. {
  651. get
  652. {
  653. return this.play_skill_array_;
  654. }
  655. }
  656. public YotogiNullManager null_mgr
  657. {
  658. get
  659. {
  660. return this.null_mgr_;
  661. }
  662. }
  663. public YotogiKagManager yotogi_kag
  664. {
  665. get
  666. {
  667. return this.yotogi_kag_;
  668. }
  669. }
  670. public bool is_free_mode
  671. {
  672. get
  673. {
  674. return this.is_free_mode_;
  675. }
  676. set
  677. {
  678. this.is_free_mode_ = value;
  679. }
  680. }
  681. public int fix_skill_level
  682. {
  683. get
  684. {
  685. return this.fix_skill_level_;
  686. }
  687. set
  688. {
  689. this.fix_skill_level_ = wf.Math.RoundMinMax(value, 0, 3);
  690. }
  691. }
  692. public bool is_vr_mode
  693. {
  694. get
  695. {
  696. return this.is_vr_mode_;
  697. }
  698. }
  699. public YotogiCommandMenuOVR command_menu
  700. {
  701. get
  702. {
  703. return this.command_menu_;
  704. }
  705. }
  706. public GameObject skill_select_prefab_object
  707. {
  708. get
  709. {
  710. return this.free_skill_select_mgr_.skill_select_prefab_object;
  711. }
  712. }
  713. public static YotogiManager instans { get; private set; }
  714. public YotogiPlayManager play_mgr
  715. {
  716. get
  717. {
  718. return this.play_mgr_;
  719. }
  720. }
  721. public void AddDebugLog(string text)
  722. {
  723. }
  724. public HashSet<int> acquired_propensityid_list = new HashSet<int>();
  725. private Maid maid_;
  726. private List<Maid> sub_maid_list_ = new List<Maid>();
  727. private ADVKagManager adv_kag_;
  728. private YotogiKagManager yotogi_kag_;
  729. private YotogiNullManager null_mgr_;
  730. private YotogiStageSelectManager stage_select_mgr_;
  731. private YotogiSkillSelectManager skill_select_mgr_;
  732. private YotogiPlayManager play_mgr_;
  733. private YotogiResultManager result_mgr_;
  734. private YotogiSubCharacterSelectManager sub_chara_select_mgr_;
  735. private bool is_script_call_;
  736. private bool is_free_mode_;
  737. private int fix_skill_level_;
  738. private YotogiFreeSkillSelectManager free_skill_select_mgr_;
  739. private bool is_vr_mode_;
  740. private YotogiCommandMenuOVR command_menu_;
  741. private YotogiManager.PlayingSkillData[] play_skill_array_ = new YotogiManager.PlayingSkillData[7];
  742. private YotogiManager.BackUpStatus backup_status_ = default(YotogiManager.BackUpStatus);
  743. public enum CallScreenType
  744. {
  745. Null,
  746. StageSelect,
  747. SkillSelect,
  748. Play,
  749. Result,
  750. SubCharaSelect,
  751. FreeSkillSelect
  752. }
  753. public class PlayingSkillData
  754. {
  755. public Yotogi.SkillDataPair skill_pair = new Yotogi.SkillDataPair();
  756. public int exp;
  757. public int backup_total_exp;
  758. public bool is_play;
  759. }
  760. public struct BackUpStatus
  761. {
  762. public YotogiPlay.Param param;
  763. public HashSet<int> skill_id_list;
  764. public HashSet<int> propensity;
  765. public HashSet<int> yotogi_class_list;
  766. }
  767. }