YotogiOldManager.cs 21 KB

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