PrivateCharaSelectMain.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Runtime.CompilerServices;
  5. using UnityEngine;
  6. using UnityEngine.UI;
  7. using wf;
  8. namespace PrivateMaidMode
  9. {
  10. public class PrivateCharaSelectMain : WfScreenChildren
  11. {
  12. public override void Awake()
  13. {
  14. base.Awake();
  15. this.charaContent = UTY.GetChildObject(base.root_obj, "CharacterSelect/uGUI Scroll View/Viewport/Content", false);
  16. this.charaSelectMgr = UTY.GetChildObject(base.root_obj, "CharacterSelect/uGUI Scroll View/Viewport", false).GetComponent<uGUICharacterSelectManager>();
  17. this.eventListVisibleCheckBox.onClick.Add(delegate(WFCheckBox checkBox)
  18. {
  19. this.SetEventListVisible(checkBox.check);
  20. });
  21. this.dayTalkToggle.onValueChanged.AddListener(delegate(bool call)
  22. {
  23. this.SetDayTalkToggle(call);
  24. });
  25. this.nightTalkToggle.onValueChanged.AddListener(delegate(bool call)
  26. {
  27. this.SetNightTalkToggle(call);
  28. });
  29. this.hEventToggle.onValueChanged.AddListener(delegate(bool call)
  30. {
  31. this.SetHEventToggle(call);
  32. });
  33. }
  34. protected override void OnCall()
  35. {
  36. GameMain.Instance.MainLight.Reset();
  37. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  38. GameMain.Instance.SoundMgr.VoiceStopAll();
  39. this.m_selectMaid = null;
  40. this.m_selectBG = null;
  41. this.m_selectLocation = null;
  42. this.charaMgr = GameMain.Instance.CharacterMgr;
  43. this.isDaily = this.charaMgr.status.isDaytime;
  44. this.dayTalkToggle.isOn = GameMain.Instance.CMSystem.SConfig.PrivateModeSettingDayTalkEnabled;
  45. this.nightTalkToggle.isOn = GameMain.Instance.CMSystem.SConfig.PrivateModeSettingNightTalkEnabled;
  46. this.hEventToggle.isOn = GameMain.Instance.CMSystem.SConfig.PrivateModeSettingHEventEnabled;
  47. this.charaSelectMgr.SetCallBackOnSelect(new uGUICharacterSelectManager.CallBackOnSelect(this.SelectCharacter));
  48. uGUICharacterSelectManager uGUICharacterSelectManager = this.charaSelectMgr;
  49. if (PrivateCharaSelectMain.<>f__mg$cache0 == null)
  50. {
  51. PrivateCharaSelectMain.<>f__mg$cache0 = new uGUICharacterSelectManager.CallBackMaidList(uGUICharacterSelectManager.PrivateMaidList);
  52. }
  53. uGUICharacterSelectManager.SetCallBackMaidList(PrivateCharaSelectMain.<>f__mg$cache0);
  54. this.charaSelectMgr.Create(uGUICharacterSelectManager.Type.Private);
  55. this.buttonList = this.charaSelectMgr.GetButtonList();
  56. this.maidList = this.charaSelectMgr.GetMaidList();
  57. this.buttonList[0].onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnSelectNoSelect)));
  58. if (this.maidList.Count > 0)
  59. {
  60. this.CreateRandomButton(this.buttonList[1], PrivateCharaSelectMain.SelectType.Maid);
  61. for (int i = 2; i < this.buttonList.Count; i++)
  62. {
  63. this.buttonList[i].onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnClickSelectChara)));
  64. }
  65. if (PrivateModeMgr.Instance.isRandomMaid)
  66. {
  67. this.charaContent.GetComponent<uGUITabPanel>().Select(this.buttonList[1]);
  68. }
  69. }
  70. this.CreateBGPanel();
  71. this.CreateBGPosPanel();
  72. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  73. GameMain.Instance.CharacterMgr.DeactivateMaid(0);
  74. if (PrivateModeMgr.Instance.LoadPrivateMaid(this.isDaily))
  75. {
  76. this.m_selectMaid = PrivateModeMgr.Instance.PrivateMaid;
  77. this.m_selectBG = PrivateModeMgr.Instance.SelectBG;
  78. this.m_selectLocation = PrivateModeMgr.Instance.SelectLocation;
  79. this.SetSelectAll();
  80. this.SetEventListVisible(GameMain.Instance.CMSystem.SConfig.PrivateModeSettingEventListVisible);
  81. this.eventSelectPanel.Setup(null, null);
  82. }
  83. else
  84. {
  85. uGUITabPanel component = this.charaContent.GetComponent<uGUITabPanel>();
  86. component.Select(this.buttonList[0]);
  87. }
  88. uGUITutorialPanel.OpenTutorial("ScenePrivate", null, false);
  89. }
  90. public void SetPrivateSettingManager(PrivateSettingManager mgr)
  91. {
  92. this.privateManager = mgr;
  93. }
  94. private void CreateBGPanel()
  95. {
  96. GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG);
  97. this.ResetChildren(parentPanel.transform);
  98. this.bgList = new List<DataBase.BG>();
  99. using (List<DataBase.Data>.Enumerator enumerator = DataBase.GetAllDatas(true).GetEnumerator())
  100. {
  101. while (enumerator.MoveNext())
  102. {
  103. DataBase.Data data = enumerator.Current;
  104. if (!this.bgList.Exists((DataBase.BG bgElm) => bgElm.uniqueName == data.bgData.uniqueName))
  105. {
  106. this.bgList.Add(data.bgData);
  107. }
  108. }
  109. }
  110. this.enabledBGList = new List<DataBase.BG>();
  111. for (int i = 0; i < this.bgList.Count; i++)
  112. {
  113. GameObject f_goParent = Utility.CreatePrefab(parentPanel, "ScenePrivate/SelectButton", true);
  114. uGUITabButton component = UTY.GetChildObject(f_goParent, "Plate", false).GetComponent<uGUITabButton>();
  115. component.onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnSelectBG)));
  116. if (!this.bgList[i].enabled)
  117. {
  118. component.interactable = false;
  119. }
  120. else
  121. {
  122. this.enabledBGList.Add(this.bgList[i]);
  123. }
  124. Text component2 = UTY.GetChildObject(f_goParent, "Text", false).GetComponent<Text>();
  125. component2.text = this.bgList[i].drawName;
  126. }
  127. GameObject f_goParent2 = Utility.CreatePrefab(parentPanel, "ScenePrivate/RandomButton", true);
  128. uGUITabButton component3 = UTY.GetChildObject(f_goParent2, "Plate", false).GetComponent<uGUITabButton>();
  129. this.CreateRandomButton(component3, PrivateCharaSelectMain.SelectType.BG);
  130. parentPanel.GetComponent<uGUITabPanel>().UpdateChildren();
  131. if (PrivateModeMgr.Instance.isRandomBG)
  132. {
  133. parentPanel.GetComponent<uGUITabPanel>().Select(component3);
  134. }
  135. else
  136. {
  137. DataBase.BG bgdata = DataBase.GetBGData("執務室");
  138. int index = this.bgList.IndexOf(bgdata);
  139. uGUITabButton component4 = UTY.GetChildObject(parentPanel.transform.GetChild(index).gameObject, "Plate", false).GetComponent<uGUITabButton>();
  140. parentPanel.GetComponent<uGUITabPanel>().Select(component4);
  141. }
  142. }
  143. private void CreateBGPosPanel()
  144. {
  145. GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
  146. this.ResetChildren(parentPanel.transform);
  147. for (int i = 0; i < this.m_selectBG.locations.Length; i++)
  148. {
  149. GameObject f_goParent = Utility.CreatePrefab(parentPanel, "ScenePrivate/SelectButton", true);
  150. uGUITabButton component = UTY.GetChildObject(f_goParent, "Plate", false).GetComponent<uGUITabButton>();
  151. component.onSelectEvent.Add(new EventDelegate(new EventDelegate.Callback(this.OnSelectBGPos)));
  152. Text component2 = UTY.GetChildObject(f_goParent, "Text", false).GetComponent<Text>();
  153. component2.text = this.m_selectBG.locations[i].drawName;
  154. }
  155. GameObject f_goParent2 = Utility.CreatePrefab(parentPanel, "ScenePrivate/RandomButton", true);
  156. uGUITabButton component3 = UTY.GetChildObject(f_goParent2, "Plate", false).GetComponent<uGUITabButton>();
  157. this.CreateRandomButton(component3, PrivateCharaSelectMain.SelectType.BGPos);
  158. parentPanel.GetComponent<uGUITabPanel>().UpdateChildren();
  159. bool flag = false;
  160. if (PrivateModeMgr.Instance.isRandomBG)
  161. {
  162. parentPanel.GetComponent<uGUITabPanel>().Select(component3);
  163. this.SetCanSelectButton(parentPanel.GetComponent<uGUITabPanel>(), false);
  164. flag = true;
  165. }
  166. else if (PrivateModeMgr.Instance.isRandomLocation)
  167. {
  168. parentPanel.GetComponent<uGUITabPanel>().Select(component3);
  169. flag = true;
  170. }
  171. else if (this.m_selectLocation != null)
  172. {
  173. foreach (DataBase.BG.Location location in this.m_selectBG.locations)
  174. {
  175. if (location == this.m_selectLocation)
  176. {
  177. this.SetSelect(PrivateCharaSelectMain.SelectType.BGPos);
  178. flag = true;
  179. break;
  180. }
  181. }
  182. }
  183. if (!flag)
  184. {
  185. uGUITabButton component4 = UTY.GetChildObject(parentPanel.transform.GetChild(0).gameObject, "Plate", false).GetComponent<uGUITabButton>();
  186. parentPanel.GetComponent<uGUITabPanel>().Select(component4);
  187. }
  188. }
  189. private void CreateRandomButton(uGUITabButton button, PrivateCharaSelectMain.SelectType type)
  190. {
  191. EventDelegate eventDelegate = new EventDelegate(this, "OnSelectRandom");
  192. if (type != PrivateCharaSelectMain.SelectType.BG)
  193. {
  194. if (type != PrivateCharaSelectMain.SelectType.BGPos)
  195. {
  196. if (type == PrivateCharaSelectMain.SelectType.Maid)
  197. {
  198. eventDelegate.parameters[0].value = PrivateCharaSelectMain.SelectType.Maid;
  199. }
  200. }
  201. else
  202. {
  203. eventDelegate.parameters[0].value = PrivateCharaSelectMain.SelectType.BGPos;
  204. }
  205. }
  206. else
  207. {
  208. eventDelegate.parameters[0].value = PrivateCharaSelectMain.SelectType.BG;
  209. }
  210. button.onSelectEvent.Add(eventDelegate);
  211. }
  212. private void ResetChildren(Transform parentTrans)
  213. {
  214. for (int i = 0; i < parentTrans.childCount; i++)
  215. {
  216. UnityEngine.Object.Destroy(parentTrans.GetChild(i).gameObject);
  217. }
  218. parentTrans.DetachChildren();
  219. }
  220. private void ResetSetting()
  221. {
  222. GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG);
  223. DataBase.BG bgdata = DataBase.GetBGData("執務室");
  224. int index = this.bgList.IndexOf(bgdata);
  225. uGUITabButton component = UTY.GetChildObject(parentPanel.transform.GetChild(index).gameObject, "Plate", false).GetComponent<uGUITabButton>();
  226. parentPanel.GetComponent<uGUITabPanel>().Select(component);
  227. parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
  228. uGUITabButton component2 = UTY.GetChildObject(parentPanel.transform.GetChild(0).gameObject, "Plate", false).GetComponent<uGUITabButton>();
  229. parentPanel.GetComponent<uGUITabPanel>().Select(component2);
  230. this.ResetCamera();
  231. }
  232. private void OnSelectNoSelect()
  233. {
  234. this.charaMgr.DeactivateMaidAll();
  235. this.m_selectMaid = null;
  236. PrivateModeMgr.Instance.isRandomMaid = false;
  237. this.bgPanel.SetActive(false);
  238. this.bgPositionPanel.SetActive(false);
  239. this.ResetSetting();
  240. this.SetEventListVisible(false);
  241. this.eventListVisibleCheckBox.gameObject.SetActive(false);
  242. }
  243. private void OnClickSelectChara()
  244. {
  245. PrivateModeMgr.Instance.isRandomMaid = false;
  246. }
  247. private void SelectCharacter(Maid select_maid)
  248. {
  249. this.bgPanel.SetActive(true);
  250. this.bgPositionPanel.SetActive(true);
  251. if (select_maid != null && this.m_selectMaid != select_maid)
  252. {
  253. GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
  254. this.m_selectMaid = select_maid;
  255. this.charaMgr.SetActiveMaid(this.m_selectMaid, 0);
  256. this.m_selectMaid.Visible = true;
  257. base.StartCoroutine(this.WaitCharaLoad());
  258. this.SetEventListVisible(true);
  259. this.eventListVisibleCheckBox.gameObject.SetActive(true);
  260. this.eventSelectPanel.Setup(this.m_selectMaid, this.m_selectBG);
  261. }
  262. }
  263. private IEnumerator WaitCharaLoad()
  264. {
  265. while (this.charaMgr.IsBusy())
  266. {
  267. yield return null;
  268. }
  269. yield return null;
  270. yield return null;
  271. this.m_selectBG.Apply(this.isDaily);
  272. GameMain.Instance.ScriptMgr.is_motion_blend = false;
  273. this.m_selectLocation.LoadScript();
  274. GameMain.Instance.ScriptMgr.is_motion_blend = true;
  275. GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
  276. yield break;
  277. }
  278. private void OnSelectBG()
  279. {
  280. uGUITabButton selectButton = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG).GetComponent<uGUITabPanel>().GetSelectButton();
  281. DataBase.BG bg = this.bgList[selectButton.transform.parent.GetSiblingIndex()];
  282. if (bg != null && this.m_selectBG != bg)
  283. {
  284. this.SelectBG(bg);
  285. }
  286. PrivateModeMgr.Instance.isRandomBG = false;
  287. GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
  288. this.SetCanSelectButton(parentPanel.GetComponent<uGUITabPanel>(), true);
  289. }
  290. private void SelectBG(DataBase.BG bg)
  291. {
  292. if (bg == null)
  293. {
  294. return;
  295. }
  296. GameMain.Instance.MainCamera.FadeOut(0.5f, false, null, true, default(Color));
  297. this.m_selectBG = bg;
  298. this.m_selectBG.Apply(this.isDaily);
  299. this.CreateBGPosPanel();
  300. this.eventSelectPanel.Setup(this.m_selectMaid, this.m_selectBG);
  301. GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
  302. }
  303. private void OnSelectBGPos()
  304. {
  305. uGUITabButton selectButton = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos).GetComponent<uGUITabPanel>().GetSelectButton();
  306. DataBase.BG.Location location = this.m_selectBG.locations[selectButton.transform.parent.GetSiblingIndex()];
  307. if (location != null)
  308. {
  309. this.SelectBGPos(location);
  310. }
  311. PrivateModeMgr.Instance.isRandomLocation = false;
  312. }
  313. private void SelectBGPos(DataBase.BG.Location select_location)
  314. {
  315. GameMain.Instance.MainCamera.FadeOut(0.5f, false, null, true, default(Color));
  316. this.m_selectLocation = select_location;
  317. if (this.m_selectMaid != null)
  318. {
  319. GameMain.Instance.ScriptMgr.is_motion_blend = false;
  320. this.m_selectLocation.LoadScript();
  321. GameMain.Instance.ScriptMgr.is_motion_blend = true;
  322. }
  323. GameMain.Instance.MainCamera.FadeIn(0.5f, false, null, true, true, default(Color));
  324. }
  325. private void SetSelectAll()
  326. {
  327. this.SetSelect(PrivateCharaSelectMain.SelectType.Maid);
  328. this.SetSelect(PrivateCharaSelectMain.SelectType.BG);
  329. this.SetSelect(PrivateCharaSelectMain.SelectType.BGPos);
  330. }
  331. private void SetSelect(PrivateCharaSelectMain.SelectType type)
  332. {
  333. if (type != PrivateCharaSelectMain.SelectType.Maid)
  334. {
  335. if (type != PrivateCharaSelectMain.SelectType.BG)
  336. {
  337. if (type == PrivateCharaSelectMain.SelectType.BGPos)
  338. {
  339. if (this.m_selectLocation == null)
  340. {
  341. return;
  342. }
  343. if (PrivateModeMgr.Instance.isRandomLocation)
  344. {
  345. return;
  346. }
  347. GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
  348. this.Select(type, parentPanel);
  349. }
  350. }
  351. else
  352. {
  353. if (this.m_selectBG == null)
  354. {
  355. return;
  356. }
  357. if (PrivateModeMgr.Instance.isRandomBG)
  358. {
  359. this.CreateBGPosPanel();
  360. return;
  361. }
  362. GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG);
  363. this.Select(type, parentPanel);
  364. this.CreateBGPosPanel();
  365. }
  366. }
  367. else
  368. {
  369. if (PrivateModeMgr.Instance.isRandomMaid)
  370. {
  371. return;
  372. }
  373. this.charaSelectMgr.SelectMaid(this.m_selectMaid);
  374. }
  375. }
  376. private void Select(PrivateCharaSelectMain.SelectType type, GameObject parentObj)
  377. {
  378. string a = null;
  379. if (type != PrivateCharaSelectMain.SelectType.BG)
  380. {
  381. if (type == PrivateCharaSelectMain.SelectType.BGPos)
  382. {
  383. a = this.m_selectLocation.drawName;
  384. }
  385. }
  386. else
  387. {
  388. a = this.m_selectBG.drawName;
  389. }
  390. uGUITabPanel component = parentObj.GetComponent<uGUITabPanel>();
  391. Transform transform = parentObj.transform;
  392. for (int i = 0; i < transform.childCount; i++)
  393. {
  394. string text = UTY.GetChildObject(transform.GetChild(i).gameObject, "Text", false).GetComponent<Text>().text;
  395. if (a == text)
  396. {
  397. uGUITabButton component2 = UTY.GetChildObject(transform.GetChild(i).gameObject, "Plate", false).GetComponent<uGUITabButton>();
  398. component.Select(component2);
  399. return;
  400. }
  401. }
  402. }
  403. private void OnSelectRandom(PrivateCharaSelectMain.SelectType type)
  404. {
  405. if (type == PrivateCharaSelectMain.SelectType.Maid && this.maidList != null)
  406. {
  407. int index = UnityEngine.Random.Range(0, this.maidList.Count);
  408. this.SelectCharacter(this.maidList[index]);
  409. PrivateModeMgr.Instance.isRandomMaid = true;
  410. this.SetButtonTouch(this.GetParentPanel(PrivateCharaSelectMain.SelectType.Maid).GetComponent<uGUITabPanel>().GetSelectButton(), true);
  411. }
  412. if (type == PrivateCharaSelectMain.SelectType.BG && this.enabledBGList != null)
  413. {
  414. int index2 = UnityEngine.Random.Range(0, this.enabledBGList.Count);
  415. this.SelectBG(this.enabledBGList[index2]);
  416. PrivateModeMgr.Instance.isRandomBG = true;
  417. PrivateModeMgr.Instance.isRandomLocation = true;
  418. this.SetButtonTouch(this.GetParentPanel(PrivateCharaSelectMain.SelectType.BG).GetComponent<uGUITabPanel>().GetSelectButton(), true);
  419. GameObject parentPanel = this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos);
  420. uGUITabButton component = UTY.GetChildObject(parentPanel.transform.GetChild(parentPanel.transform.childCount - 1).gameObject, "Plate", false).GetComponent<uGUITabButton>();
  421. parentPanel.GetComponent<uGUITabPanel>().Select(component);
  422. }
  423. if (type == PrivateCharaSelectMain.SelectType.BGPos && this.m_selectBG != null)
  424. {
  425. int num = UnityEngine.Random.Range(0, this.m_selectBG.locations.Length);
  426. this.SelectBGPos(this.m_selectBG.locations[num]);
  427. PrivateModeMgr.Instance.isRandomLocation = true;
  428. if (PrivateModeMgr.Instance.isRandomBG)
  429. {
  430. this.SetCanSelectButton(this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos).GetComponent<uGUITabPanel>(), false);
  431. }
  432. this.SetButtonTouch(this.GetParentPanel(PrivateCharaSelectMain.SelectType.BGPos).GetComponent<uGUITabPanel>().GetSelectButton(), true);
  433. }
  434. }
  435. private void ResetCamera()
  436. {
  437. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  438. GameMain.Instance.MainCamera.SetTargetPos(new Vector3(0.5609447f, 1.380762f, -1.382336f), true);
  439. GameMain.Instance.MainCamera.SetDistance(1.6f, true);
  440. GameMain.Instance.MainCamera.SetAroundAngle(new Vector2(245.5691f, 6.273283f), true);
  441. GameMain.Instance.MainCamera.SetTargetOffset(Vector3.zero, false);
  442. }
  443. private GameObject GetParentPanel(PrivateCharaSelectMain.SelectType type)
  444. {
  445. if (type == PrivateCharaSelectMain.SelectType.Maid)
  446. {
  447. if (this.charaContent != null)
  448. {
  449. this.charaContent = UTY.GetChildObject(base.root_obj, "CharacterSelect/uGUI Scroll View/Viewport/Content", false);
  450. }
  451. return this.charaContent;
  452. }
  453. if (type == PrivateCharaSelectMain.SelectType.BG)
  454. {
  455. return UTY.GetChildObject(this.bgPanel, "uGUI Scroll View/Viewport/Content", false);
  456. }
  457. if (type != PrivateCharaSelectMain.SelectType.BGPos)
  458. {
  459. return null;
  460. }
  461. return UTY.GetChildObject(this.bgPositionPanel, "uGUI Scroll View/Viewport/Content", false);
  462. }
  463. private void SetButtonTouch(uGUITabButton button, bool isActive)
  464. {
  465. button.GetComponent<uGUISelectableAnimation>().enabled = isActive;
  466. button.maskObj.SetActive(!isActive);
  467. }
  468. private void SetCanSelectButton(uGUITabPanel parent, bool select)
  469. {
  470. for (int i = 0; i < parent.transform.childCount; i++)
  471. {
  472. uGUITabButton component = UTY.GetChildObject(parent.transform.GetChild(i).gameObject, "Plate", false).GetComponent<uGUITabButton>();
  473. if (component.maskObj != null)
  474. {
  475. component.maskObj.SetActive(!select);
  476. }
  477. }
  478. }
  479. private void SetEventListVisible(bool visible)
  480. {
  481. this.eventListVisibleCheckBox.check = visible;
  482. this.eventSelectPanel.gameObject.SetActive(visible);
  483. GameMain.Instance.CMSystem.SConfig.PrivateModeSettingEventListVisible = visible;
  484. }
  485. private void SetDayTalkToggle(bool value)
  486. {
  487. this.dayTalkToggle.isOn = value;
  488. this.SetToggleColor(this.dayTalkToggle, value);
  489. GameMain.Instance.CMSystem.SConfig.PrivateModeSettingDayTalkEnabled = value;
  490. }
  491. private void SetNightTalkToggle(bool value)
  492. {
  493. this.nightTalkToggle.isOn = value;
  494. this.SetToggleColor(this.nightTalkToggle, value);
  495. GameMain.Instance.CMSystem.SConfig.PrivateModeSettingNightTalkEnabled = value;
  496. }
  497. private void SetHEventToggle(bool value)
  498. {
  499. this.hEventToggle.isOn = value;
  500. this.SetToggleColor(this.hEventToggle, value);
  501. GameMain.Instance.CMSystem.SConfig.PrivateModeSettingHEventEnabled = value;
  502. }
  503. private void SetToggleColor(Toggle toggle, bool value)
  504. {
  505. ColorBlock colors = toggle.colors;
  506. if (value)
  507. {
  508. colors.normalColor = Color.white;
  509. colors.highlightedColor = Color.white;
  510. }
  511. else
  512. {
  513. colors.normalColor = Color.gray;
  514. colors.highlightedColor = Color.gray;
  515. }
  516. toggle.colors = colors;
  517. }
  518. public void OnClickOKButton()
  519. {
  520. PrivateModeMgr.Instance.SetPrivateMaid(this.m_selectMaid);
  521. PrivateModeMgr.Instance.SetPrivateBG(this.m_selectBG);
  522. PrivateModeMgr.Instance.SetPrivateLocation(this.m_selectLocation);
  523. this.Finish();
  524. }
  525. protected override void OnFinish()
  526. {
  527. if (this.privateManager.MoveScreen.IsExistNextFile())
  528. {
  529. this.privateManager.CallScreen("Move");
  530. }
  531. }
  532. [SerializeField]
  533. private PrivateEventSelectPanel eventSelectPanel;
  534. [SerializeField]
  535. private WFCheckBox eventListVisibleCheckBox;
  536. [SerializeField]
  537. private Toggle dayTalkToggle;
  538. [SerializeField]
  539. private Toggle nightTalkToggle;
  540. [SerializeField]
  541. private Toggle hEventToggle;
  542. private Maid m_selectMaid;
  543. private DataBase.BG m_selectBG;
  544. private DataBase.BG.Location m_selectLocation;
  545. private PrivateSettingManager privateManager;
  546. private CharacterMgr charaMgr;
  547. private uGUICharacterSelectManager charaSelectMgr;
  548. private List<uGUITabButton> buttonList;
  549. private List<Maid> maidList;
  550. private List<DataBase.BG> bgList;
  551. private List<DataBase.BG> enabledBGList;
  552. private bool isDaily;
  553. private GameObject charaContent;
  554. [SerializeField]
  555. private GameObject bgPanel;
  556. [SerializeField]
  557. private GameObject bgPositionPanel;
  558. [CompilerGenerated]
  559. private static uGUICharacterSelectManager.CallBackMaidList <>f__mg$cache0;
  560. public enum SelectType
  561. {
  562. Maid,
  563. BG,
  564. BGPos
  565. }
  566. }
  567. }