YotogiOldManager.cs 21 KB

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