SceneCharacterSelect.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. using System;
  2. using System.Collections.Generic;
  3. using Schedule;
  4. public class SceneCharacterSelect : WfScreenManager
  5. {
  6. public static void CreateYotogiCharaList()
  7. {
  8. SceneCharacterSelect.chara_guid_stock_list.Clear();
  9. List<Maid> yotogiMaids = ScheduleAPI.GetYotogiMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
  10. for (int i = 0; i < yotogiMaids.Count; i++)
  11. {
  12. SceneCharacterSelect.chara_guid_stock_list.Add(yotogiMaids[i].status.guid);
  13. }
  14. }
  15. public static void CreateVipCharaList()
  16. {
  17. SceneCharacterSelect.chara_guid_stock_list.Clear();
  18. List<Maid> vipWorkMaids = ScheduleAPI.GetVipWorkMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
  19. for (int i = 0; i < vipWorkMaids.Count; i++)
  20. {
  21. SceneCharacterSelect.chara_guid_stock_list.Add(vipWorkMaids[i].status.guid);
  22. }
  23. }
  24. public static void CreateFacilityCharaList()
  25. {
  26. SceneCharacterSelect.chara_guid_stock_list.Clear();
  27. List<Maid> facilityPowerUpMaids = ScheduleAPI.GetFacilityPowerUpMaids(GameMain.Instance.CharacterMgr.status.isDaytime);
  28. for (int i = 0; i < facilityPowerUpMaids.Count; i++)
  29. {
  30. SceneCharacterSelect.chara_guid_stock_list.Add(facilityPowerUpMaids[i].status.guid);
  31. }
  32. }
  33. public static bool IsSelectChara()
  34. {
  35. return 0 < SceneCharacterSelect.chara_guid_stock_list.Count;
  36. }
  37. public void Awake()
  38. {
  39. this.adv_kag_ = GameMain.Instance.ScriptMgr.adv_kag;
  40. }
  41. public override void Start()
  42. {
  43. base.Start();
  44. this.move_screen_ = base.children_dic["Move"].GetComponent<WfScreenMoveChildren>();
  45. this.select_type_ = SceneCharacterSelect.SelectType.Communication;
  46. this.select_dance_chara_num_ = 1;
  47. string empty = string.Empty;
  48. string empty2 = string.Empty;
  49. if (this.adv_kag_.tag_backup != null && 0 < this.adv_kag_.tag_backup.Count && this.adv_kag_.tag_backup["name"] == "SceneCharacterSelect")
  50. {
  51. NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("label"), "SceneCharacterSelectにlabelの設定がされていませんでした");
  52. NDebug.Assert(this.adv_kag_.tag_backup.ContainsKey("type"), "SceneCharacterSelectにtypeの設定がされていませんでした");
  53. this.move_screen_.SetNextLabel(this.adv_kag_.tag_backup["label"]);
  54. if (this.adv_kag_.tag_backup.ContainsKey("cancel_label"))
  55. {
  56. CharacterSelectMain component = base.children_dic["Main"].GetComponent<CharacterSelectMain>();
  57. component.SetCancelLabel(this.adv_kag_.tag_backup["cancel_label"]);
  58. }
  59. try
  60. {
  61. this.select_type_ = (SceneCharacterSelect.SelectType)Enum.Parse(typeof(SceneCharacterSelect.SelectType), this.adv_kag_.tag_backup["type"]);
  62. }
  63. catch
  64. {
  65. NDebug.Assert("SelectType enum parse error.\n" + this.adv_kag_.tag_backup["type"], false);
  66. }
  67. if (this.adv_kag_.tag_backup["type"] == "コミュ")
  68. {
  69. this.select_type_ = SceneCharacterSelect.SelectType.Communication;
  70. }
  71. if (this.adv_kag_.tag_backup.ContainsKey("select_chara_num"))
  72. {
  73. this.select_dance_chara_num_ = int.Parse(this.adv_kag_.tag_backup["select_chara_num"]);
  74. }
  75. if (this.adv_kag_.tag_backup.ContainsKey("maid"))
  76. {
  77. this.select_maid_slot_ = int.Parse(this.adv_kag_.tag_backup["maid"]);
  78. }
  79. }
  80. if (this.select_type_ != SceneCharacterSelect.SelectType.VRComSelect && this.select_type_ != SceneCharacterSelect.SelectType.Additional)
  81. {
  82. GameMain.Instance.MainLight.Reset();
  83. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  84. GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
  85. }
  86. GameMain.Instance.SoundMgr.VoiceStopAll();
  87. this.CallScreen("Main");
  88. }
  89. protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> children_dic)
  90. {
  91. string[] array = new string[]
  92. {
  93. "Main",
  94. "Move"
  95. };
  96. for (int i = 0; i < array.Length; i++)
  97. {
  98. WfScreenChildren component = UTY.GetChildObject(base.gameObject, array[i], false).GetComponent<WfScreenChildren>();
  99. component.parent_mgr = this;
  100. children_dic.Add(array[i], component);
  101. }
  102. }
  103. public WfScreenMoveChildren move_screen
  104. {
  105. get
  106. {
  107. return this.move_screen_;
  108. }
  109. }
  110. public SceneCharacterSelect.SelectType select_type
  111. {
  112. get
  113. {
  114. return this.select_type_;
  115. }
  116. }
  117. public int select_dance_chara_num
  118. {
  119. get
  120. {
  121. return this.select_dance_chara_num_;
  122. }
  123. }
  124. public int select_maid_slot
  125. {
  126. get
  127. {
  128. return this.select_maid_slot_;
  129. }
  130. }
  131. public static List<string> chara_guid_stock_list = new List<string>();
  132. public static List<Maid> select_maid_list = new List<Maid>();
  133. private WfScreenMoveChildren move_screen_;
  134. private ADVKagManager adv_kag_;
  135. private SceneCharacterSelect.SelectType select_type_;
  136. private int select_dance_chara_num_;
  137. private int select_maid_slot_;
  138. public enum SelectType
  139. {
  140. Communication,
  141. Yotogi,
  142. Vip,
  143. CompetitiveShow,
  144. TouchCharaSelect,
  145. VRComSelect,
  146. Free,
  147. Facility,
  148. Recollection,
  149. VRKaraokeSelect,
  150. Additional
  151. }
  152. }