YotogiOldManager.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  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.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
  292. stockMaid.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
  293. }
  294. }
  295. for (int j = 0; j < characterMgr.GetStockManCount(); j++)
  296. {
  297. Maid stockMan = characterMgr.GetStockMan(j);
  298. if (stockMan != null && stockMan.body0 != null && stockMan.body0.isLoadedBody)
  299. {
  300. stockMan.IKTargetToBone("左手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
  301. stockMan.IKTargetToBone("右手", null, "無し", Vector3.zero, IKCtrlData.IKAttachType.Point, false, false, false);
  302. }
  303. }
  304. string[] array = new string[]
  305. {
  306. "handitem",
  307. "kousoku_upper",
  308. "kousoku_lower",
  309. "skirt",
  310. "panz",
  311. "mizugi",
  312. "onepiece",
  313. "accanl",
  314. "accvag",
  315. "KubiScl",
  316. "UdeScl",
  317. "DouPer",
  318. "sintyou",
  319. "kata"
  320. };
  321. for (int k = 0; k < characterMgr.GetMaidCount(); k++)
  322. {
  323. Maid maid = characterMgr.GetMaid(k);
  324. if (maid != null && maid.Visible)
  325. {
  326. maid.OpenMouth(false);
  327. maid.DelPrefabAll();
  328. for (int l = 0; l < array.Length; l++)
  329. {
  330. maid.ResetProp(array[l], true);
  331. }
  332. maid.AllProcPropSeqStart();
  333. }
  334. }
  335. for (int m = 0; m < characterMgr.GetManCount(); m++)
  336. {
  337. Maid man = characterMgr.GetMan(m);
  338. if (man != null && man.Visible)
  339. {
  340. man.DelPrefabAll();
  341. for (int n = 0; n < array.Length; n++)
  342. {
  343. man.ResetProp(array[n], false);
  344. }
  345. man.AllProcPropSeqStart();
  346. }
  347. }
  348. }
  349. public void UnVisibleMaidAndMan(bool maid_unvisible, bool man_unvisible)
  350. {
  351. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  352. if (man_unvisible)
  353. {
  354. for (int i = 0; i < characterMgr.GetManCount(); i++)
  355. {
  356. Maid man = characterMgr.GetMan(i);
  357. if (man != null)
  358. {
  359. man.Visible = false;
  360. }
  361. }
  362. }
  363. if (maid_unvisible)
  364. {
  365. for (int j = 0; j < characterMgr.GetMaidCount(); j++)
  366. {
  367. Maid maid = characterMgr.GetMaid(j);
  368. if (maid != null)
  369. {
  370. maid.Visible = false;
  371. }
  372. }
  373. }
  374. }
  375. public void ApplyStatus()
  376. {
  377. int exp = 0;
  378. for (int i = 0; i < this.play_skill_array.Length; i++)
  379. {
  380. Skill.Old.Data base_data = this.play_skill_array[i].skill_pair.base_data;
  381. if (base_data != null)
  382. {
  383. if (this.play_skill_array[i].is_play)
  384. {
  385. this.play_skill_array[i].skill_pair.param.playCount += 1u;
  386. this.play_skill_array[i].skill_pair.param.expSystem.AddExp(this.play_skill_array[i].exp);
  387. string flagName = "夜伽_カテゴリー_実行回数_" + base_data.category.ToString();
  388. this.maid_.status.OldStatus.AddFlag(flagName, 1);
  389. }
  390. this.play_skill_array[i].exp = 0;
  391. }
  392. }
  393. this.maid_.status.playCountYotogi++;
  394. this.maid_.status.selectedYotogiClass.expSystem.AddExp(exp);
  395. this.maid_.status.UpdateClassBonusStatus();
  396. this.maid_.status.studyRate -= 50;
  397. List<Skill.Old.Data> learnPossibleSkills = Skill.Old.GetLearnPossibleSkills(this.maid_.status);
  398. foreach (Skill.Old.Data data in learnPossibleSkills)
  399. {
  400. this.maid_.status.yotogiSkill.Add(data.id);
  401. }
  402. }
  403. public void SetRepeatVoiceFile(string file_name, int maid_no)
  404. {
  405. this.play_mgr_.SetRepeatVoiceFile(file_name, maid_no);
  406. }
  407. public void OnChangeSeikeiken()
  408. {
  409. if (!this.is_vr_mode || this.vr_select_menu == null)
  410. {
  411. return;
  412. }
  413. this.vr_select_menu.skillSelectMgr.UpdateData(this.maid, YotogiOldManager.select_vr_stage_data.stage, YotogiOldManager.select_vr_stage_spot_no);
  414. }
  415. public void DebugOnClickCallStageSelect()
  416. {
  417. this.null_mgr_.SetNextLabel(string.Empty);
  418. this.CallScreen(YotogiOldManager.CallScreenType.StageSelect.ToString());
  419. }
  420. public void DebugOnClickCallSkillSelect()
  421. {
  422. this.null_mgr_.SetNextLabel(string.Empty);
  423. this.CreateBackUpStatus();
  424. this.CallScreen(YotogiOldManager.CallScreenType.SkillSelect.ToString());
  425. }
  426. public void DebugOnClickCallPlay()
  427. {
  428. this.null_mgr_.SetNextLabel(string.Empty);
  429. this.CallScreen(YotogiOldManager.CallScreenType.Play.ToString());
  430. }
  431. public void DebugOnClickCallResult()
  432. {
  433. this.null_mgr_.SetNextLabel(string.Empty);
  434. this.CallScreen(YotogiOldManager.CallScreenType.Result.ToString());
  435. }
  436. public void DebugOnClickCallCharaSelect()
  437. {
  438. this.null_mgr_.SetNextLabel(string.Empty);
  439. this.CallScreen(YotogiOldManager.CallScreenType.SubCharaSelect.ToString());
  440. }
  441. public void DebugOnClickNewScene()
  442. {
  443. this.CallScreen(YotogiOldManager.CallScreenType.FreeSkillSelect.ToString());
  444. }
  445. public bool IsCallShouldSubCharaSelect()
  446. {
  447. List<int> list = new List<int>();
  448. HashSet<int> hashSet = new HashSet<int>();
  449. if (this.is_free_mode)
  450. {
  451. int[] keyArray = this.maid.status.yotogiSkill.oldDatas.GetKeyArray();
  452. for (int i = 0; i < keyArray.Length; i++)
  453. {
  454. Skill.Old.Data skillData = YotogiOld.GetSkillData(keyArray[i]);
  455. if (!hashSet.Contains(skillData.player_num))
  456. {
  457. hashSet.Add(skillData.player_num);
  458. list.Add(skillData.player_num);
  459. }
  460. }
  461. }
  462. else
  463. {
  464. if (this.play_skill_array == null)
  465. {
  466. return false;
  467. }
  468. for (int j = 0; j < this.play_skill_array.Length; j++)
  469. {
  470. if (this.play_skill_array[j] != null && this.play_skill_array[j].skill_pair.base_data != null)
  471. {
  472. if (!hashSet.Contains(this.play_skill_array[j].skill_pair.base_data.player_num))
  473. {
  474. hashSet.Add(this.play_skill_array[j].skill_pair.base_data.player_num);
  475. list.Add(this.play_skill_array[j].skill_pair.base_data.player_num);
  476. }
  477. }
  478. }
  479. }
  480. list.Sort();
  481. int playPossibleMaidCount = this.GetPlayPossibleMaidCount();
  482. int num = 0;
  483. for (int k = 0; k < list.Count; k++)
  484. {
  485. if (list[k] <= playPossibleMaidCount)
  486. {
  487. num = list[k];
  488. }
  489. }
  490. return 1 < num;
  491. }
  492. public int GetPlayPossibleMaidCount()
  493. {
  494. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  495. int num = 0;
  496. if (this.is_script_call_ && !this.is_free_mode)
  497. {
  498. num = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime).Count;
  499. }
  500. else
  501. {
  502. for (int i = 0; i < characterMgr.GetStockMaidCount(); i++)
  503. {
  504. Maid stockMaid = characterMgr.GetStockMaid(i);
  505. if (stockMaid != null && stockMaid.status.isCompatiblePersonality && !stockMaid.status.OldStatus.isRentalMaid)
  506. {
  507. num++;
  508. }
  509. }
  510. }
  511. return num;
  512. }
  513. public void GetSubMaidList(List<Maid> draw_list)
  514. {
  515. if (draw_list == null)
  516. {
  517. return;
  518. }
  519. List<Maid> list = new List<Maid>();
  520. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  521. if (this.is_script_call_ && !this.is_free_mode)
  522. {
  523. List<Maid> yotogiMaids = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
  524. for (int i = 0; i < yotogiMaids.Count; i++)
  525. {
  526. if (yotogiMaids[i] != this.maid_ && this.maid.status.isCompatiblePersonality && !this.maid.status.OldStatus.isRentalMaid)
  527. {
  528. list.Add(yotogiMaids[i]);
  529. }
  530. }
  531. }
  532. else
  533. {
  534. for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
  535. {
  536. Maid stockMaid = characterMgr.GetStockMaid(j);
  537. if (stockMaid != null && this.maid_ != stockMaid && stockMaid.status.isCompatiblePersonality && !stockMaid.status.OldStatus.isRentalMaid)
  538. {
  539. list.Add(stockMaid);
  540. }
  541. }
  542. }
  543. draw_list.Clear();
  544. draw_list.AddRange(list);
  545. }
  546. public void CallVRMenu()
  547. {
  548. if (this.vr_select_menu != null)
  549. {
  550. this.vr_select_menu.CallFromYotogiScene(YotogiOldManager.select_vr_stage_data, YotogiOldManager.select_vr_stage_spot_no, YotogiOldManager.select_vr_skill_data);
  551. }
  552. }
  553. public void CallVRPlayEnd()
  554. {
  555. YotogiOldManager.select_vr_skill_data = null;
  556. this.play_mgr_.OnClickNext();
  557. }
  558. public YotogiOldManager.BackUpStatus GetBackUpStatus()
  559. {
  560. return this.backup_status_;
  561. }
  562. public Maid maid
  563. {
  564. get
  565. {
  566. return this.maid_;
  567. }
  568. }
  569. public int skill_select_max_hp
  570. {
  571. get
  572. {
  573. return this.maid_.status.maxHp;
  574. }
  575. }
  576. public YotogiOldManager.PlayingSkillData[] play_skill_array
  577. {
  578. get
  579. {
  580. return this.play_skill_array_;
  581. }
  582. }
  583. public YotogiNullManager null_mgr
  584. {
  585. get
  586. {
  587. return this.null_mgr_;
  588. }
  589. }
  590. public YotogiKagManager yotogi_kag
  591. {
  592. get
  593. {
  594. return this.yotogi_kag_;
  595. }
  596. }
  597. public bool is_free_mode
  598. {
  599. get
  600. {
  601. return this.is_free_mode_;
  602. }
  603. set
  604. {
  605. this.is_free_mode_ = value;
  606. }
  607. }
  608. public int fix_skill_level
  609. {
  610. get
  611. {
  612. return this.fix_skill_level_;
  613. }
  614. set
  615. {
  616. this.fix_skill_level_ = wf.Math.RoundMinMax(value, 0, 3);
  617. }
  618. }
  619. public bool is_vr_mode
  620. {
  621. get
  622. {
  623. return this.is_vr_mode_;
  624. }
  625. }
  626. public YotogiOldCommandMenuOVR command_menu
  627. {
  628. get
  629. {
  630. return this.command_menu_;
  631. }
  632. }
  633. public VRYotogiOldSelectMenu vr_select_menu
  634. {
  635. get
  636. {
  637. return this.vr_select_menu_;
  638. }
  639. }
  640. public GameObject skill_select_prefab_object
  641. {
  642. get
  643. {
  644. return this.free_skill_select_mgr_.skill_select_prefab_object;
  645. }
  646. }
  647. public static YotogiOldManager instans { get; private set; }
  648. public YotogiOldPlayManager play_mgr
  649. {
  650. get
  651. {
  652. return this.play_mgr_;
  653. }
  654. }
  655. public void AddDebugLog(string text)
  656. {
  657. }
  658. public static YotogiOld.VRSkillData select_vr_skill_data;
  659. public static YotogiOld.StageData select_vr_stage_data;
  660. public static int select_vr_stage_spot_no;
  661. private Maid maid_;
  662. private List<Maid> sub_maid_list_ = new List<Maid>();
  663. private ADVKagManager adv_kag_;
  664. private YotogiKagManager yotogi_kag_;
  665. private YotogiNullManager null_mgr_;
  666. private YotogiOldStageSelectManager stage_select_mgr_;
  667. private YotogiOldSkillSelectManager skill_select_mgr_;
  668. private YotogiOldPlayManager play_mgr_;
  669. private YotogiOldResultManager result_mgr_;
  670. private YotogiOldSubCharacterSelectManager sub_chara_select_mgr_;
  671. private bool is_script_call_;
  672. private bool is_free_mode_;
  673. private int fix_skill_level_;
  674. private YotogiOldFreeSkillSelectManager free_skill_select_mgr_;
  675. private bool is_vr_mode_;
  676. private YotogiOldCommandMenuOVR command_menu_;
  677. private VRYotogiOldSelectMenu vr_select_menu_;
  678. private YotogiOldManager.PlayingSkillData[] play_skill_array_ = new YotogiOldManager.PlayingSkillData[7];
  679. private YotogiOldManager.BackUpStatus backup_status_ = default(YotogiOldManager.BackUpStatus);
  680. public enum CallScreenType
  681. {
  682. Null,
  683. StageSelect,
  684. SkillSelect,
  685. Play,
  686. Result,
  687. SubCharaSelect,
  688. FreeSkillSelect
  689. }
  690. public class PlayingSkillData
  691. {
  692. public YotogiOld.SkillDataPair skill_pair;
  693. public int exp;
  694. public int backup_total_exp;
  695. public bool is_play;
  696. }
  697. public struct BackUpStatus
  698. {
  699. public YotogiOldPlay.Param param;
  700. public HashSet<int> skill_id_list;
  701. public HashSet<int> propensity;
  702. }
  703. }