KasizukiMainMenu.cs 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using wf;
  6. namespace Kasizuki
  7. {
  8. public class KasizukiMainMenu : WfScreenChildren
  9. {
  10. public override void Awake()
  11. {
  12. base.Awake();
  13. GameObject gameObject = base.transform.parent.parent.gameObject;
  14. this.m_SwitchingWindowDic = new Dictionary<string, NGUIWindow>();
  15. this.m_SwitchingWindowDic.Add("部屋選択", UTY.GetChildObject(gameObject, "Window Select Club", false).GetComponent<NGUIWindow>());
  16. this.m_SwitchingWindowDic.Add("メインメニュー", base.root_obj.GetComponent<NGUIWindow>());
  17. this.m_SwitchingWindowDic.Add("メイド情報", UTY.GetChildObject(gameObject, "MaidMiniManagement", false).AddComponent<NGUIWindow>());
  18. this.m_SwitchingWindowDic.Add("セーブロード", UTY.GetChildObject(gameObject, "SaveAndLoadPanel", false).GetComponent<NGUIWindow>());
  19. this.m_SwitchingWindowDic.Add("男選択", UTY.GetChildObject(gameObject, "Window Select Man", false).GetComponent<NGUIWindow>());
  20. this.m_SwitchingWindowDic.Add("施設情報", UTY.GetChildObject(gameObject, "Window Play Info", false).GetComponent<NGUIWindow>());
  21. this.SetUpMainMenu();
  22. this.SetUpSelectRoom();
  23. this.SetUpSaveLoad();
  24. this.SetUpManSelect();
  25. this.SetUpPlayInfo();
  26. }
  27. protected override void OnCall()
  28. {
  29. this.m_SwitchingWindowDic["部屋選択"].GetCache<UIButton>("OK").isEnabled = (KasizukiMainMenu.m_NowSelectingRoom != null);
  30. this.m_SwitchingWindowDic["メイド情報"].OnOpen = delegate()
  31. {
  32. MaidMiniManagementCtrl component = base.parent_mgr.children_dic["MaidInfo"].GetComponent<MaidMiniManagementCtrl>();
  33. component.buttonDic["エディット"].gameObject.SetActive(component.selectMaid != null);
  34. };
  35. if ((base.parent_mgr as SceneKasizukiMainMenu).isReturnEdit)
  36. {
  37. MaidMiniManagementCtrl maidMiniManagementCtrl = base.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  38. if (KasizukiMainMenu.m_NowSelectingRoom != null)
  39. {
  40. KasizukiCharacterSelectCtrl charaSelect = maidMiniManagementCtrl.charaSelectMgr;
  41. maidMiniManagementCtrl.selectMaid = null;
  42. charaSelect.callbackGetMaidList = delegate()
  43. {
  44. ManDataType nowManType = (ManDataType)GameMain.Instance.KasizukiMgr.GetNowManType();
  45. List<PlayData.Data> playDatas = KasizukiMainMenu.m_NowSelectingRoom.GetPlayDatas();
  46. List<PlayData.Data> list = new List<PlayData.Data>();
  47. foreach (PlayData.Data data in playDatas)
  48. {
  49. if (data.enableManTypeDic[nowManType])
  50. {
  51. list.Add(data);
  52. }
  53. }
  54. HashSet<Maid> hashSet = new HashSet<Maid>();
  55. foreach (PlayData.Data data2 in list)
  56. {
  57. List<Maid> filteringPlayDataMaidArray = data2.GetFilteringPlayDataMaidArray(nowManType);
  58. foreach (Maid item in filteringPlayDataMaidArray)
  59. {
  60. hashSet.Add(item);
  61. }
  62. }
  63. charaSelect.callbackGetMaidList = null;
  64. return new List<Maid>(hashSet);
  65. };
  66. }
  67. this.OpenSwitchingWindow("メイド情報", true);
  68. this.SetMaidInfoWindowParameter(KasizukiMainMenu.m_BackUpBeforeMaidInfoParameter);
  69. }
  70. else
  71. {
  72. this.OpenSwitchingWindow("メインメニュー", true);
  73. }
  74. if ((base.parent_mgr as SceneKasizukiMainMenu).isUpdateMaidStatus)
  75. {
  76. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  77. Maid maid = characterMgr.GetMaid(0);
  78. if (maid != null)
  79. {
  80. Debug.Log("メイドの仕事回数、好感度を更新");
  81. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  82. bool systemData = kasizukiMgr.GetSystemData<bool>(SystemDataType.仕事回数ロック);
  83. int num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.仕事回数, false);
  84. if (!systemData)
  85. {
  86. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.仕事回数, num + 1, false);
  87. }
  88. if (!kasizukiMgr.GetSystemData<bool>(SystemDataType.好感度ロック))
  89. {
  90. if (kasizukiMgr.GetNowManType() != 10)
  91. {
  92. if (kasizukiMgr.GetNowManType() == 20)
  93. {
  94. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男1, false);
  95. num += 4;
  96. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男1, num, false);
  97. }
  98. else if (kasizukiMgr.GetNowManType() == 30)
  99. {
  100. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男2, false);
  101. num += 4;
  102. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男2, num, false);
  103. }
  104. else if (kasizukiMgr.GetNowManType() == 40)
  105. {
  106. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男3, false);
  107. num += 4;
  108. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男3, num, false);
  109. }
  110. else if (kasizukiMgr.GetNowManType() == 50)
  111. {
  112. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男4, false);
  113. num += 4;
  114. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男4, num, false);
  115. }
  116. else if (kasizukiMgr.GetNowManType() == 60)
  117. {
  118. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男5, false);
  119. num += 4;
  120. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男5, num, false);
  121. }
  122. else if (kasizukiMgr.GetNowManType() == 70)
  123. {
  124. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男6, false);
  125. num += 4;
  126. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男6, num, false);
  127. }
  128. else if (kasizukiMgr.GetNowManType() == 80)
  129. {
  130. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男7, false);
  131. num += 4;
  132. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男7, num, false);
  133. }
  134. else if (kasizukiMgr.GetNowManType() == 90)
  135. {
  136. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男8, false);
  137. num += 4;
  138. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男8, num, false);
  139. }
  140. else if (kasizukiMgr.GetNowManType() == 100)
  141. {
  142. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男9, false);
  143. num += 4;
  144. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男9, num, false);
  145. }
  146. else if (kasizukiMgr.GetNowManType() == 110)
  147. {
  148. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男10, false);
  149. num += 4;
  150. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男10, num, false);
  151. }
  152. else if (kasizukiMgr.GetNowManType() == 120)
  153. {
  154. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男11, false);
  155. num += 4;
  156. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男11, num, false);
  157. }
  158. else if (kasizukiMgr.GetNowManType() == 130)
  159. {
  160. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男12, false);
  161. num += 4;
  162. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男12, num, false);
  163. }
  164. else if (kasizukiMgr.GetNowManType() == 140)
  165. {
  166. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男13, false);
  167. num += 4;
  168. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男13, num, false);
  169. }
  170. else if (kasizukiMgr.GetNowManType() == 150)
  171. {
  172. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男14, false);
  173. num += 4;
  174. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男14, num, false);
  175. }
  176. else if (kasizukiMgr.GetNowManType() == 160)
  177. {
  178. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男15, false);
  179. num += 4;
  180. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男15, num, false);
  181. }
  182. else if (kasizukiMgr.GetNowManType() == 170)
  183. {
  184. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男16, false);
  185. num += 4;
  186. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男16, num, false);
  187. }
  188. else if (kasizukiMgr.GetNowManType() == 180)
  189. {
  190. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男17, false);
  191. num += 4;
  192. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男17, num, false);
  193. }
  194. else if (kasizukiMgr.GetNowManType() == 190)
  195. {
  196. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男18, false);
  197. num += 4;
  198. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男18, num, false);
  199. }
  200. else if (kasizukiMgr.GetNowManType() == 200)
  201. {
  202. num = kasizukiMgr.GetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男19, false);
  203. num += 4;
  204. kasizukiMgr.SetMaidData<int>(maid, MaidDataType.好感度\uFF3F傅き男19, num, false);
  205. }
  206. }
  207. }
  208. Debug.Log("プレイ回数を更新");
  209. num = kasizukiMgr.GetSystemData<int>(SystemDataType.プレイ回数);
  210. num++;
  211. kasizukiMgr.SetSystemData<int>(SystemDataType.プレイ回数, num, false);
  212. }
  213. }
  214. }
  215. private void SetUpMainMenu()
  216. {
  217. NGUIWindow nguiwindow = this.m_SwitchingWindowDic["メインメニュー"];
  218. foreach (UIButton uibutton in new List<UIButton>
  219. {
  220. nguiwindow.CacheChildObject<UIButton>("parent button/Grid/男選択", "男選択"),
  221. nguiwindow.CacheChildObject<UIButton>("parent button/Grid/クラブ", "クラブ"),
  222. nguiwindow.CacheChildObject<UIButton>("parent button/Grid/セーブ", "セーブ"),
  223. nguiwindow.CacheChildObject<UIButton>("parent button/Grid/ロード", "ロード"),
  224. nguiwindow.CacheChildObject<UIButton>("parent button/Grid/ヒロイン", "ヒロイン"),
  225. nguiwindow.CacheChildObject<UIButton>("parent button/Grid/フリー", "フリー"),
  226. nguiwindow.CacheChildObject<UIButton>("parent button/Grid/タイトルに戻る", "タイトルに戻る")
  227. })
  228. {
  229. EventDelegate.Add(uibutton.onClick, new EventDelegate.Callback(this.OnClickButton));
  230. }
  231. }
  232. private void SetUpSelectRoom()
  233. {
  234. NGUIWindow nguiwindow = this.m_SwitchingWindowDic["部屋選択"];
  235. nguiwindow.CacheChildObject<UIButton>("OK", "OK");
  236. nguiwindow.CacheChildObject<UIButton>("Cancel", "Cancel");
  237. EventDelegate.Add(nguiwindow.GetCache<UIButton>("OK").onClick, delegate()
  238. {
  239. this.OnOKRoom();
  240. });
  241. EventDelegate.Add(nguiwindow.GetCache<UIButton>("Cancel").onClick, delegate()
  242. {
  243. this.OpenSwitchingWindow("メインメニュー", false);
  244. });
  245. nguiwindow.GetComponent<ClubRoomSelectCtrl>().SetCallbackOnClick(new Action<RoomData.Data>(this.OnSelectRoom));
  246. }
  247. private void SetUpSaveLoad()
  248. {
  249. NGUIWindow nguiwindow = this.m_SwitchingWindowDic["セーブロード"];
  250. KasizukiSaveAndLoadCtrl component = nguiwindow.GetComponent<KasizukiSaveAndLoadCtrl>();
  251. NDebug.Assert(component != null, "セーブロードUIが取得できない");
  252. KasizukiSaveAndLoadCtrl kasizukiSaveAndLoadCtrl = component;
  253. kasizukiSaveAndLoadCtrl.onClickCancel = (Action)Delegate.Combine(kasizukiSaveAndLoadCtrl.onClickCancel, new Action(delegate()
  254. {
  255. this.OpenSwitchingWindow("メインメニュー", false);
  256. }));
  257. KasizukiSaveAndLoadCtrl kasizukiSaveAndLoadCtrl2 = component;
  258. kasizukiSaveAndLoadCtrl2.onClickNewGame = (Action)Delegate.Combine(kasizukiSaveAndLoadCtrl2.onClickNewGame, new Action(delegate()
  259. {
  260. SceneKasizukiMainMenu mgr = base.parent_mgr as SceneKasizukiMainMenu;
  261. mgr.CameraFadeOut(delegate
  262. {
  263. mgr.UpdateMan(delegate
  264. {
  265. mgr.CameraFadeIn(null);
  266. this.OpenSwitchingWindow("メインメニュー", true);
  267. });
  268. }, 0.5f);
  269. }));
  270. KasizukiSaveAndLoadCtrl kasizukiSaveAndLoadCtrl3 = component;
  271. kasizukiSaveAndLoadCtrl3.onLoad = (Action)Delegate.Combine(kasizukiSaveAndLoadCtrl3.onLoad, new Action(delegate()
  272. {
  273. SceneKasizukiMainMenu mgr = base.parent_mgr as SceneKasizukiMainMenu;
  274. mgr.CameraFadeOut(delegate
  275. {
  276. mgr.UpdateMan(delegate
  277. {
  278. mgr.CameraFadeIn(null);
  279. this.OpenSwitchingWindow("メインメニュー", true);
  280. });
  281. }, 0.5f);
  282. }));
  283. KasizukiSaveAndLoadCtrl kasizukiSaveAndLoadCtrl4 = component;
  284. kasizukiSaveAndLoadCtrl4.onSave = (Action)Delegate.Combine(kasizukiSaveAndLoadCtrl4.onSave, new Action(delegate()
  285. {
  286. int nowOriginSaveDataNumber = GameMain.Instance.KasizukiMgr.NowOriginSaveDataNumber;
  287. if (GameMain.Instance.GetSaveDataHeader(nowOriginSaveDataNumber) == null)
  288. {
  289. NDebug.Assert("本編セーブデータ" + nowOriginSaveDataNumber + "番の取得に失敗しました", false);
  290. return;
  291. }
  292. GameMain.Instance.SerializeKasizukiOnly(nowOriginSaveDataNumber);
  293. }));
  294. KasizukiSaveAndLoadCtrl kasizukiSaveAndLoadCtrl5 = component;
  295. kasizukiSaveAndLoadCtrl5.onDelete = (Action)Delegate.Combine(kasizukiSaveAndLoadCtrl5.onDelete, new Action(delegate()
  296. {
  297. int nowOriginSaveDataNumber = GameMain.Instance.KasizukiMgr.NowOriginSaveDataNumber;
  298. if (GameMain.Instance.GetSaveDataHeader(nowOriginSaveDataNumber) == null)
  299. {
  300. NDebug.Assert("本編セーブデータ" + nowOriginSaveDataNumber + "番の取得に失敗しました", false);
  301. return;
  302. }
  303. GameMain.Instance.SerializeKasizukiOnly(nowOriginSaveDataNumber);
  304. }));
  305. }
  306. private void SetUpManSelect()
  307. {
  308. NGUIWindow nguiwindow = this.m_SwitchingWindowDic["男選択"];
  309. nguiwindow.CacheChildObject<UIButton>("OK", "OK");
  310. nguiwindow.CacheChildObject<UIButton>("Cancel", "Cancel");
  311. EventDelegate.Add(nguiwindow.GetCache<UIButton>("OK").onClick, delegate()
  312. {
  313. this.OpenSwitchingWindow("メインメニュー", false);
  314. });
  315. EventDelegate.Add(nguiwindow.GetCache<UIButton>("Cancel").onClick, delegate()
  316. {
  317. this.OpenSwitchingWindow("メインメニュー", false);
  318. });
  319. KasizukiManSelectCtrl compManSelect = nguiwindow.GetComponent<KasizukiManSelectCtrl>();
  320. if (compManSelect)
  321. {
  322. NGUIWindow nguiwindow2 = nguiwindow;
  323. nguiwindow2.OnOpen = (Action)Delegate.Combine(nguiwindow2.OnOpen, new Action(delegate()
  324. {
  325. int nowManType = GameMain.Instance.KasizukiMgr.GetNowManType();
  326. compManSelect.OnClickManListButton(nowManType);
  327. }));
  328. KasizukiManSelectCtrl compManSelect2 = compManSelect;
  329. compManSelect2.OnClickManTypeButton = (Action<int>)Delegate.Combine(compManSelect2.OnClickManTypeButton, new Action<int>(delegate(int manTypeID)
  330. {
  331. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  332. kasizukiMgr.SetNowManType(manTypeID);
  333. SceneKasizukiMainMenu sceneMgr = this.parent_mgr as SceneKasizukiMainMenu;
  334. sceneMgr.UpdateMan(delegate
  335. {
  336. sceneMgr.CameraFadeIn(null);
  337. });
  338. }));
  339. }
  340. }
  341. private void SetUpPlayInfo()
  342. {
  343. NGUIWindow window = this.m_SwitchingWindowDic["施設情報"];
  344. window.CacheChildObject<UIButton>("OK", "OK");
  345. window.CacheChildObject<UIButton>("Cancel", "Cancel");
  346. KasizukiPlayInfoCtrl comp = window.GetComponent<KasizukiPlayInfoCtrl>();
  347. RoomData.Data selectingRoomData = null;
  348. ManData.Data selectingManData = null;
  349. PlayData.Data selectingPlayData = null;
  350. EventDelegate.Add(window.GetCache<UIButton>("OK").onClick, delegate()
  351. {
  352. MaidMiniManagementCtrl maidMiniManagementCtrl = this.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  353. this.StartFree(maidMiniManagementCtrl.selectMaid, selectingRoomData, selectingManData, selectingPlayData);
  354. });
  355. EventDelegate.Set(window.GetCache<UIButton>("Cancel").onClick, delegate()
  356. {
  357. this.OpenSwitchingWindow("メインメニュー", false);
  358. });
  359. Action actResetDescriptionWindow = delegate()
  360. {
  361. UILabel cache = comp.descriptionCache.GetCache<UILabel>("説明文");
  362. uGUIListViewer cache2 = comp.descriptionCache.GetCache<uGUIListViewer>("条件一覧");
  363. cache.text = string.Empty;
  364. cache2.ResetList();
  365. };
  366. Action<PlayData.Data> actSetDescriptionWindow = delegate(PlayData.Data playData)
  367. {
  368. UILabel cache = comp.descriptionCache.GetCache<UILabel>("説明文");
  369. cache.text = playData.strDescription;
  370. Utility.SetLocalizeTerm(cache, playData.strDescriptionTerm, false);
  371. uGUIListViewer cache2 = comp.descriptionCache.GetCache<uGUIListViewer>("条件一覧");
  372. string[] strConditionArray = playData.strConditionArray;
  373. string[] strConditionArrayTerm = playData.strConditionArrayTerms;
  374. cache2.Show<Transform>(strConditionArray.Length, delegate(int index, Transform trans)
  375. {
  376. UILabel component = UTY.GetChildObject(trans.gameObject, "Value", false).GetComponent<UILabel>();
  377. UILabel component2 = UTY.GetChildObject(trans.gameObject, "Number", false).GetComponent<UILabel>();
  378. component.text = strConditionArray[index];
  379. Utility.SetLocalizeTerm(component, strConditionArrayTerm[index], false);
  380. component2.text = (index + 1).ToString();
  381. });
  382. cache2.GetComponent<UIGrid>().Reposition();
  383. };
  384. Action<RoomData.Data, ManData.Data, PlayData.Data> actSetOKButtonEnable = delegate(RoomData.Data roomData, ManData.Data manData, PlayData.Data playData)
  385. {
  386. UIButton cache = window.GetCache<UIButton>("OK");
  387. cache.isEnabled = (roomData != null && manData != null && playData != null);
  388. };
  389. NGUIWindow window2 = window;
  390. window2.OnOpen = (Action)Delegate.Combine(window2.OnOpen, new Action(delegate()
  391. {
  392. selectingManData = ManData.GetData(GameMain.Instance.KasizukiMgr.GetNowManType());
  393. List<RoomData.Data> datas;
  394. if (!GameMain.Instance.CharacterMgr.status.lockNTRPlay)
  395. {
  396. datas = RoomData.GetDatas(delegate(RoomData.Data data)
  397. {
  398. if (!data.isExistUpwardRoom)
  399. {
  400. return false;
  401. }
  402. if (data.isOnlyNTR)
  403. {
  404. return false;
  405. }
  406. MaidMiniManagementCtrl maidMiniManagementCtrl = this.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  407. foreach (PlayData.Data data2 in data.GetPlayDatas())
  408. {
  409. if (data2.IsCorrectPersonal(maidMiniManagementCtrl.selectMaid))
  410. {
  411. return true;
  412. }
  413. }
  414. return false;
  415. });
  416. }
  417. else
  418. {
  419. datas = RoomData.GetDatas(delegate(RoomData.Data data)
  420. {
  421. RoomData.Data subordinateRoomData = data.GetSubordinateRoomData();
  422. if (subordinateRoomData != null)
  423. {
  424. return false;
  425. }
  426. if (!data.enableManTypeDic[ManDataType.主人公])
  427. {
  428. return false;
  429. }
  430. if (!data.isEnableNTR && !data.isOnlyNTR)
  431. {
  432. return false;
  433. }
  434. List<PlayData.Data> playDatas = data.GetPlayDatas();
  435. for (int i = 0; i < playDatas.Count; i++)
  436. {
  437. if (playDatas[i].enableManTypeDic[ManDataType.主人公])
  438. {
  439. return true;
  440. }
  441. }
  442. return false;
  443. });
  444. }
  445. comp.OpenRoomList(datas, selectingRoomData);
  446. if (selectingRoomData != null)
  447. {
  448. comp.onClickRoom(selectingRoomData);
  449. }
  450. actResetDescriptionWindow();
  451. actSetOKButtonEnable(selectingRoomData, selectingManData, selectingPlayData);
  452. }));
  453. KasizukiPlayInfoCtrl comp6 = comp;
  454. comp6.onClickRoom = (Action<RoomData.Data>)Delegate.Combine(comp6.onClickRoom, new Action<RoomData.Data>(delegate(RoomData.Data roomData)
  455. {
  456. selectingRoomData = roomData;
  457. comp.OpenManList(ManData.GetAllDatas(true, true), selectingManData, delegate(UIWFTabButton item, ManData.Data data)
  458. {
  459. bool flag = false;
  460. MaidMiniManagementCtrl maidMiniManagementCtrl = this.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  461. foreach (PlayData.Data data2 in selectingRoomData.GetPlayDatas())
  462. {
  463. if (data2.enableManTypeDic[data.manType] && data2.IsCorrectPersonal(maidMiniManagementCtrl.selectMaid))
  464. {
  465. flag = true;
  466. break;
  467. }
  468. }
  469. if (!flag && item.isSelected)
  470. {
  471. item.SetSelect(false);
  472. }
  473. item.gameObject.SetActive(flag);
  474. });
  475. List<PlayData.Data> datas = PlayData.GetDatas(delegate(PlayData.Data data)
  476. {
  477. if (data.roomID != selectingRoomData.ID)
  478. {
  479. return false;
  480. }
  481. if (!data.enableManTypeDic[selectingManData.manType])
  482. {
  483. return false;
  484. }
  485. MaidMiniManagementCtrl maidMiniManagementCtrl = this.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  486. return data.IsCorrectPersonal(maidMiniManagementCtrl.selectMaid);
  487. });
  488. comp.OpenPlayList(datas, null);
  489. actResetDescriptionWindow();
  490. selectingPlayData = null;
  491. actSetOKButtonEnable(selectingRoomData, selectingManData, selectingPlayData);
  492. }));
  493. KasizukiPlayInfoCtrl comp2 = comp;
  494. comp2.onClickMan = (Action<ManData.Data>)Delegate.Combine(comp2.onClickMan, new Action<ManData.Data>(delegate(ManData.Data manData)
  495. {
  496. selectingManData = manData;
  497. List<PlayData.Data> datas = PlayData.GetDatas((PlayData.Data data) => data.roomID == selectingRoomData.ID && data.enableManTypeDic[selectingManData.manType]);
  498. comp.OpenPlayList(datas, null);
  499. actResetDescriptionWindow();
  500. selectingPlayData = null;
  501. actSetOKButtonEnable(selectingRoomData, selectingManData, selectingPlayData);
  502. }));
  503. KasizukiPlayInfoCtrl comp3 = comp;
  504. comp3.onClickPlay = (Action<PlayData.Data>)Delegate.Combine(comp3.onClickPlay, new Action<PlayData.Data>(delegate(PlayData.Data playData)
  505. {
  506. selectingPlayData = playData;
  507. actSetDescriptionWindow(selectingPlayData);
  508. actSetOKButtonEnable(selectingRoomData, selectingManData, selectingPlayData);
  509. }));
  510. KasizukiPlayInfoCtrl comp4 = comp;
  511. comp4.onHoverPlay = (Action<PlayData.Data>)Delegate.Combine(comp4.onHoverPlay, new Action<PlayData.Data>(delegate(PlayData.Data playData)
  512. {
  513. actSetDescriptionWindow(playData);
  514. }));
  515. KasizukiPlayInfoCtrl comp5 = comp;
  516. comp5.onOutPlay = (Action<PlayData.Data>)Delegate.Combine(comp5.onOutPlay, new Action<PlayData.Data>(delegate(PlayData.Data playData)
  517. {
  518. if (selectingPlayData == null)
  519. {
  520. actResetDescriptionWindow();
  521. }
  522. else
  523. {
  524. actSetDescriptionWindow(selectingPlayData);
  525. }
  526. }));
  527. }
  528. protected void OnClickButton()
  529. {
  530. NGUIWindow nguiwindow = this.m_SwitchingWindowDic["メインメニュー"];
  531. List<UnityEngine.Object> values = nguiwindow.cachedObjectDic.Values;
  532. if (!values.Contains(UIButton.current))
  533. {
  534. NDebug.Warning(string.Format("クリックされたボタン名に対応するボタンがありません\n{0}", UIButton.current.name));
  535. }
  536. string name = UIButton.current.name;
  537. if (name == "男選択")
  538. {
  539. this.OpenSwitchingWindow("男選択", false);
  540. }
  541. else if (name == "クラブ")
  542. {
  543. if (!this.CheckPlayableRoom())
  544. {
  545. GameMain.Instance.SysDlg.ShowFromLanguageTerm("SceneKasizukiMainMenu/ダイアログ/利用可能な施設がありません。", null, SystemDialog.TYPE.OK, null, null);
  546. return;
  547. }
  548. if (!this.CheckPlayableMaid())
  549. {
  550. GameMain.Instance.SysDlg.ShowFromLanguageTerm("SceneKasizukiMainMenu/ダイアログ/プレイ可能なメイドがいません。", null, SystemDialog.TYPE.OK, null, null);
  551. return;
  552. }
  553. this.OnSelectRoom(null);
  554. this.OpenSwitchingWindow("部屋選択", false);
  555. (this.m_SwitchingWindowDic["部屋選択"] as ClubRoomSelectCtrl).SetData();
  556. }
  557. else if (name == "セーブ")
  558. {
  559. this.OpenSwitchingWindow("セーブロード", false);
  560. KasizukiSaveAndLoadCtrl component = this.m_SwitchingWindowDic["セーブロード"].GetComponent<KasizukiSaveAndLoadCtrl>();
  561. component.Open(SaveAndLoadMgr.ViewType.Save, true);
  562. }
  563. else if (name == "ロード")
  564. {
  565. this.OpenSwitchingWindow("セーブロード", false);
  566. KasizukiSaveAndLoadCtrl component2 = this.m_SwitchingWindowDic["セーブロード"].GetComponent<KasizukiSaveAndLoadCtrl>();
  567. component2.Open(SaveAndLoadMgr.ViewType.Load, true);
  568. }
  569. else if (name == "ヒロイン")
  570. {
  571. this.OpenSwitchingWindow("メイド情報", false);
  572. this.SetMaidInfoWindowParameter("ヒロイン情報");
  573. }
  574. else if (name == "フリー")
  575. {
  576. this.OpenSwitchingWindow("メイド情報", false);
  577. this.SetMaidInfoWindowParameter("フリーモード");
  578. }
  579. else if (name == "タイトルに戻る")
  580. {
  581. GameMain.Instance.SysDlg.ShowFromLanguageTerm("SceneKasizukiMainMenu/ダイアログ/保存されていない情報は失われます。タイトルに戻りますか?", null, SystemDialog.TYPE.YES_NO, delegate
  582. {
  583. GameMain.Instance.SysDlg.Close();
  584. GameMain.Instance.LoadScene("SceneToTitle");
  585. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  586. }, delegate
  587. {
  588. GameMain.Instance.SysDlg.Close();
  589. });
  590. }
  591. }
  592. public void OpenSwitchingWindow(string name, bool isImmediate = false)
  593. {
  594. Dictionary<string, NGUIWindow> switchingWindowDic = this.m_SwitchingWindowDic;
  595. if (switchingWindowDic == null)
  596. {
  597. NDebug.Assert("ウィンドウの配列にnullが指定されました", false);
  598. }
  599. if (!switchingWindowDic.ContainsKey(name))
  600. {
  601. NDebug.Assert(string.Format("ウィンドウの配列には「{0}」のキーが存在しません", name), false);
  602. }
  603. if (name == "メインメニュー")
  604. {
  605. MaidMiniManagementCtrl maidMiniManagementCtrl = base.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  606. maidMiniManagementCtrl.selectMaid = null;
  607. }
  608. foreach (KeyValuePair<string, NGUIWindow> keyValuePair in switchingWindowDic)
  609. {
  610. if (keyValuePair.Key == name)
  611. {
  612. if (isImmediate)
  613. {
  614. keyValuePair.Value.Open(0.01f, null);
  615. }
  616. else
  617. {
  618. keyValuePair.Value.Open(0.25f, null);
  619. }
  620. }
  621. else if (isImmediate)
  622. {
  623. keyValuePair.Value.Close(0.01f, null);
  624. }
  625. else
  626. {
  627. keyValuePair.Value.Close(0.25f, null);
  628. }
  629. }
  630. }
  631. public void CloseSwitchingWindowAll(bool isImmediate = false)
  632. {
  633. Dictionary<string, NGUIWindow> switchingWindowDic = this.m_SwitchingWindowDic;
  634. if (switchingWindowDic == null)
  635. {
  636. NDebug.Assert("ウィンドウの配列にnullが指定されました", false);
  637. }
  638. foreach (KeyValuePair<string, NGUIWindow> keyValuePair in switchingWindowDic)
  639. {
  640. if (isImmediate)
  641. {
  642. keyValuePair.Value.Close(0.01f, null);
  643. }
  644. else
  645. {
  646. keyValuePair.Value.Close(0.25f, null);
  647. }
  648. }
  649. }
  650. private bool CheckPlayableRoom()
  651. {
  652. ManDataType nowManType = (ManDataType)GameMain.Instance.KasizukiMgr.GetNowManType();
  653. foreach (RoomData.Data data in RoomData.GetAllDatas(true))
  654. {
  655. if (data.enableManTypeDic[nowManType])
  656. {
  657. if (data.IsExistFacility())
  658. {
  659. return true;
  660. }
  661. }
  662. }
  663. return false;
  664. }
  665. private bool CheckPlayableMaid()
  666. {
  667. ManDataType nowManType = (ManDataType)GameMain.Instance.KasizukiMgr.GetNowManType();
  668. foreach (RoomData.Data data in RoomData.GetAllDatas(true))
  669. {
  670. if (data.enableManTypeDic[nowManType])
  671. {
  672. if (data.IsExistFacility())
  673. {
  674. foreach (PlayData.Data data2 in data.GetPlayDatas())
  675. {
  676. if (data2.enableManTypeDic[nowManType])
  677. {
  678. List<Maid> filteringPlayDataMaidArray = data2.GetFilteringPlayDataMaidArray(nowManType);
  679. if (filteringPlayDataMaidArray != null && filteringPlayDataMaidArray.Count > 0)
  680. {
  681. return true;
  682. }
  683. }
  684. }
  685. }
  686. }
  687. }
  688. return false;
  689. }
  690. private void OnSelectRoom(RoomData.Data roomData)
  691. {
  692. KasizukiMainMenu.m_NowSelectingRoom = roomData;
  693. this.m_SwitchingWindowDic["部屋選択"].GetCache<UIButton>("OK").isEnabled = (KasizukiMainMenu.m_NowSelectingRoom != null);
  694. }
  695. private void OnOKRoom()
  696. {
  697. if (KasizukiMainMenu.m_NowSelectingRoom == null)
  698. {
  699. NDebug.Warning("現在選択している部屋の情報がnullでした");
  700. return;
  701. }
  702. MaidMiniManagementCtrl maidMiniManagementCtrl = base.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  703. KasizukiCharacterSelectCtrl charaSelect = maidMiniManagementCtrl.charaSelectMgr;
  704. maidMiniManagementCtrl.selectMaid = null;
  705. charaSelect.callbackGetMaidList = delegate()
  706. {
  707. ManDataType nowManType = (ManDataType)GameMain.Instance.KasizukiMgr.GetNowManType();
  708. List<PlayData.Data> playDatas = KasizukiMainMenu.m_NowSelectingRoom.GetPlayDatas();
  709. List<PlayData.Data> list = new List<PlayData.Data>();
  710. foreach (PlayData.Data data in playDatas)
  711. {
  712. if (data.enableManTypeDic[nowManType])
  713. {
  714. list.Add(data);
  715. }
  716. }
  717. HashSet<Maid> hashSet = new HashSet<Maid>();
  718. foreach (PlayData.Data data2 in list)
  719. {
  720. List<Maid> filteringPlayDataMaidArray = data2.GetFilteringPlayDataMaidArray(nowManType);
  721. foreach (Maid item in filteringPlayDataMaidArray)
  722. {
  723. hashSet.Add(item);
  724. }
  725. }
  726. charaSelect.callbackGetMaidList = null;
  727. return new List<Maid>(hashSet);
  728. };
  729. GameMain.Instance.KasizukiMgr.SetSystemData<int>(SystemDataType.選択部屋, KasizukiMainMenu.m_NowSelectingRoom.ID, true);
  730. this.OpenSwitchingWindow("メイド情報", false);
  731. this.SetMaidInfoWindowParameter("ヒロイン選択");
  732. }
  733. private void SetMaidInfoWindowParameter(string openType)
  734. {
  735. MaidMiniManagementCtrl window = base.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  736. window.Open();
  737. window.Call();
  738. if (openType == "ヒロイン情報")
  739. {
  740. window.onClickOK = delegate()
  741. {
  742. this.OpenSwitchingWindow("メインメニュー", false);
  743. };
  744. window.buttonDic["OK"].isEnabled = true;
  745. window.buttonDic["Cancel"].gameObject.SetActive(false);
  746. if (window.selectMaid == null)
  747. {
  748. window.CloseSwitchingWindowAll(true);
  749. }
  750. window.UpdateMaidInfoButtonEnable(window.selectMaid != null, true);
  751. MaidMiniStatusCtrl window4 = window.GetWindow<MaidMiniStatusCtrl>("ステータス");
  752. Collider component = window4.GetCache<UIInput>("FreeComment").GetComponent<Collider>();
  753. component.enabled = true;
  754. window4.GetCache<MaidAppealComment>("Appeal").SetEnableEditing(true);
  755. window.GetWindow<NGUIWindow>("パラメータロック").transform.localScale = Vector3.one;
  756. }
  757. else if (openType == "ヒロイン選択")
  758. {
  759. window.onClickOK = delegate()
  760. {
  761. this.StartSenario(window.selectMaid, KasizukiMainMenu.m_NowSelectingRoom);
  762. };
  763. window.onClickCancel = delegate()
  764. {
  765. this.OpenSwitchingWindow("部屋選択", false);
  766. this.OnSelectRoom(null);
  767. (this.m_SwitchingWindowDic["部屋選択"] as ClubRoomSelectCtrl).SetData();
  768. };
  769. window.buttonDic["OK"].isEnabled = (window.selectMaid != null);
  770. window.buttonDic["Cancel"].gameObject.SetActive(true);
  771. if (window.selectMaid == null)
  772. {
  773. window.CloseSwitchingWindowAll(true);
  774. }
  775. window.UpdateMaidInfoButtonEnable(window.selectMaid != null, true);
  776. MaidMiniStatusCtrl window2 = window.GetWindow<MaidMiniStatusCtrl>("ステータス");
  777. Collider component2 = window2.GetCache<UIInput>("FreeComment").GetComponent<Collider>();
  778. component2.enabled = false;
  779. window2.GetCache<MaidAppealComment>("Appeal").SetEnableEditing(false);
  780. window.GetWindow<NGUIWindow>("パラメータロック").transform.localScale = Vector3.one;
  781. }
  782. else if (openType == "フリーモード")
  783. {
  784. window.onClickOK = delegate()
  785. {
  786. this.OpenSwitchingWindow("施設情報", false);
  787. UIButton cache = this.m_SwitchingWindowDic["施設情報"].GetCache<UIButton>("Cancel");
  788. EventDelegate.Set(cache.onClick, delegate()
  789. {
  790. this.OpenSwitchingWindow("メイド情報", false);
  791. this.SetMaidInfoWindowParameter("フリーモード");
  792. });
  793. };
  794. window.onClickCancel = delegate()
  795. {
  796. this.OpenSwitchingWindow("メインメニュー", false);
  797. };
  798. window.buttonDic["OK"].isEnabled = (window.selectMaid != null);
  799. window.buttonDic["Cancel"].gameObject.SetActive(true);
  800. if (window.selectMaid == null)
  801. {
  802. window.CloseSwitchingWindowAll(true);
  803. }
  804. window.UpdateMaidInfoButtonEnable(window.selectMaid != null, true);
  805. MaidMiniStatusCtrl window3 = window.GetWindow<MaidMiniStatusCtrl>("ステータス");
  806. Collider component3 = window3.GetCache<UIInput>("FreeComment").GetComponent<Collider>();
  807. component3.enabled = false;
  808. window3.GetCache<MaidAppealComment>("Appeal").SetEnableEditing(false);
  809. window.GetWindow<NGUIWindow>("パラメータロック").transform.localScale = Vector3.zero;
  810. }
  811. else
  812. {
  813. NDebug.Warning(string.Format("メイド情報ウィンドウのレイアウト設定の文字列が対応していません\n渡された文字列:{0}", openType));
  814. }
  815. KasizukiMainMenu.m_BackUpBeforeMaidInfoParameter = openType;
  816. }
  817. private void StartSenario(Maid targetMaid, RoomData.Data targetRoom)
  818. {
  819. ManData.Data data = ManData.GetData(GameMain.Instance.KasizukiMgr.GetNowManType());
  820. Debug.LogFormat("傅きモードのシナリオを開始します\r\n選択状態↓\r\nメイド:{0}\r\n選択した部屋:{1}\r\n選択した男:{2}\r\n", new object[]
  821. {
  822. targetMaid.status.fullNameJpStyle,
  823. targetRoom.drawName,
  824. data.drawName
  825. });
  826. PlayData.Data optimalConditionData = PlayData.GetOptimalConditionData(targetMaid, targetRoom, data.manType);
  827. string scenarioFileNameReplace = optimalConditionData.GetScenarioFileNameReplace(targetMaid);
  828. Debug.LogFormat("呼び出すシナリオは「{0}」になりました", new object[]
  829. {
  830. scenarioFileNameReplace
  831. });
  832. if (!GameUty.FileSystem.IsExistentFile(scenarioFileNameReplace + ".ks"))
  833. {
  834. NDebug.Warning(string.Format("シナリオファイル「{0}」が見つかりません。\nシナリオ呼び出しは行いません。", scenarioFileNameReplace + ".ks"));
  835. return;
  836. }
  837. SceneKasizukiMainMenu sceneKasizukiMainMenu = base.parent_mgr as SceneKasizukiMainMenu;
  838. if (!sceneKasizukiMainMenu.moveScreen.IsExistNextLabel())
  839. {
  840. sceneKasizukiMainMenu.moveScreen.SetNextLabel(sceneKasizukiMainMenu.strScriptReturnLabel);
  841. }
  842. this.Finish();
  843. }
  844. private void StartFree(Maid targetMaid, RoomData.Data targetRoom, ManData.Data targetMan, PlayData.Data targetPlay)
  845. {
  846. if (!this.CheckCorrectPlayData(targetMaid, targetMan, targetPlay))
  847. {
  848. return;
  849. }
  850. Debug.LogFormat("傅きモードの回想を開始します\r\n選択状態↓\r\nメイド:{0}\r\n選択した部屋:{1}\r\n選択した男:{2}\r\n選択したプレイ情報:{3}\r\n", new object[]
  851. {
  852. targetMaid.status.fullNameJpStyle,
  853. targetRoom.drawName,
  854. targetMan.drawName,
  855. targetPlay.drawName
  856. });
  857. string scenarioFileNameReplace = targetPlay.GetScenarioFileNameReplace(targetMaid);
  858. Debug.LogFormat("呼び出すシナリオは「{0}」になりました", new object[]
  859. {
  860. scenarioFileNameReplace
  861. });
  862. if (!GameUty.FileSystem.IsExistentFile(scenarioFileNameReplace + ".ks"))
  863. {
  864. NDebug.Warning(string.Format("シナリオファイル「{0}」が見つかりません。\nシナリオ呼び出しは行いません。", scenarioFileNameReplace + ".ks"));
  865. return;
  866. }
  867. Debug.Log("システムデータのフラグを一時的に書き換え");
  868. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  869. kasizukiMgr.SetSystemData<int>(SystemDataType.選択部屋, targetRoom.ID, false);
  870. kasizukiMgr.SetNowManType(targetMan.ID);
  871. GameMain.Instance.ScriptMgr.EvalScript("tf['傅き再生_ファイル名'] = '" + scenarioFileNameReplace + "';");
  872. SceneKasizukiMainMenu sceneKasizukiMainMenu = base.parent_mgr as SceneKasizukiMainMenu;
  873. if (!sceneKasizukiMainMenu.moveScreen.IsExistNextLabel())
  874. {
  875. sceneKasizukiMainMenu.moveScreen.SetNextLabel(sceneKasizukiMainMenu.strScriptReturnLabelFree);
  876. }
  877. this.Finish();
  878. }
  879. private bool CheckCorrectPlayData(Maid targetMaid, ManData.Data targetMan, PlayData.Data targetPlay)
  880. {
  881. NDebug.AssertNull(targetMaid != null);
  882. NDebug.AssertNull(targetMan != null);
  883. NDebug.AssertNull(targetPlay != null);
  884. if (!targetPlay.IsCorrectPersonal(targetMaid))
  885. {
  886. GameMain.Instance.SysDlg.ShowFromLanguageTerm("SceneKasizukiMainMenu/ダイアログ/メイドの性格が対応していません。", null, SystemDialog.TYPE.OK, null, null);
  887. return false;
  888. }
  889. return true;
  890. }
  891. protected override void OnFinish()
  892. {
  893. this.CloseSwitchingWindowAll(true);
  894. KasizukiManager kasizukiMgr = GameMain.Instance.KasizukiMgr;
  895. Maid man = kasizukiMgr.GetMan();
  896. kasizukiMgr.SetManModel(man, (ManDataType)kasizukiMgr.GetNowManType());
  897. kasizukiMgr.UpdateManModel(man, null);
  898. man.Visible = false;
  899. CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
  900. MaidMiniManagementCtrl maidMiniManagementCtrl = base.parent_mgr.children_dic["MaidInfo"] as MaidMiniManagementCtrl;
  901. characterMgr.SetActiveMaid(maidMiniManagementCtrl.selectMaid, 0);
  902. maidMiniManagementCtrl.selectMaid.Visible = true;
  903. maidMiniManagementCtrl.selectMaid.AllProcPropSeqStart();
  904. base.StartCoroutine(this.CoroutineWaitPropSeq(maidMiniManagementCtrl.selectMaid, delegate
  905. {
  906. SceneKasizukiMainMenu sceneKasizukiMainMenu = base.parent_mgr as SceneKasizukiMainMenu;
  907. if (!string.IsNullOrEmpty(sceneKasizukiMainMenu.moveScreen.next_label))
  908. {
  909. sceneKasizukiMainMenu.CallScreen("Move");
  910. }
  911. }));
  912. }
  913. private IEnumerator CoroutineWaitPropSeq(Maid target, Action callback)
  914. {
  915. while (target.IsBusy)
  916. {
  917. yield return null;
  918. }
  919. if (callback != null)
  920. {
  921. callback();
  922. }
  923. yield break;
  924. }
  925. private static string m_BackUpBeforeMaidInfoParameter = string.Empty;
  926. private const string STR_MESSAGE_NOTHING_ROOM = "SceneKasizukiMainMenu/ダイアログ/利用可能な施設がありません。";
  927. private const string STR_MESSAGE_NOTHING_MAID = "SceneKasizukiMainMenu/ダイアログ/プレイ可能なメイドがいません。";
  928. private const string STR_MESSAGE_END = "SceneKasizukiMainMenu/ダイアログ/保存されていない情報は失われます。タイトルに戻りますか?";
  929. private const string STR_MESSAGE_INCORRECT_PERSONAL = "SceneKasizukiMainMenu/ダイアログ/メイドの性格が対応していません。";
  930. private static RoomData.Data m_NowSelectingRoom;
  931. private Dictionary<string, NGUIWindow> m_SwitchingWindowDic;
  932. }
  933. }