ScenePrivateEventModeAwake.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using System;
  2. using System.Collections.Generic;
  3. using PrivateMaidMode;
  4. public class ScenePrivateEventModeAwake : WfScreenManager
  5. {
  6. public static string returnFile { get; private set; }
  7. public static string returnLabel { get; private set; }
  8. public static int callEventId { get; private set; }
  9. public WfScreenMoveChildren moveScreen { get; private set; }
  10. private void Awake()
  11. {
  12. ScenePrivateEventModeAwake.callEventId = -1;
  13. }
  14. public override void Start()
  15. {
  16. base.Start();
  17. ADVKagManager adv_kag = GameMain.Instance.ScriptMgr.adv_kag;
  18. this.moveScreen = base.children_dic["Move"].GetComponent<WfScreenMoveChildren>();
  19. if (adv_kag.tag_backup != null && 0 < adv_kag.tag_backup.Count && adv_kag.tag_backup["name"] == "ScenePrivateEventMode")
  20. {
  21. if (adv_kag.tag_backup.ContainsKey("start"))
  22. {
  23. NDebug.Assert(adv_kag.tag_backup.ContainsKey("file"), "SceneCallにlabelの設定がされていませんでした");
  24. NDebug.Assert(adv_kag.tag_backup.ContainsKey("label"), "SceneCallにlabelの設定がされていませんでした");
  25. ScenePrivateEventModeAwake.returnFile = adv_kag.tag_backup["file"];
  26. ScenePrivateEventModeAwake.returnLabel = adv_kag.tag_backup["label"];
  27. }
  28. ScenePrivateEventModeAwake.callEventId = -1;
  29. int callEventId = 0;
  30. if (adv_kag.tag_backup.ContainsKey("eventid") && int.TryParse(adv_kag.tag_backup["eventid"], out callEventId))
  31. {
  32. ScenePrivateEventModeAwake.callEventId = callEventId;
  33. }
  34. this.moveScreen.SetNextLabel(ScenePrivateEventModeAwake.returnLabel);
  35. if (adv_kag.tag_backup.ContainsKey("event_reset"))
  36. {
  37. foreach (DataBase.BG bg in DataBase.GetAllBGDatas())
  38. {
  39. if (bg.events != null)
  40. {
  41. foreach (DataBase.BG.Event @event in bg.events)
  42. {
  43. if (@event != null)
  44. {
  45. @event.ShuffleEventPlayOrder();
  46. }
  47. }
  48. }
  49. }
  50. }
  51. }
  52. this.CallScreen("Main");
  53. }
  54. protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> children_dic)
  55. {
  56. string[] array = new string[]
  57. {
  58. "Main",
  59. "Move"
  60. };
  61. for (int i = 0; i < array.Length; i++)
  62. {
  63. WfScreenChildren component = UTY.GetChildObject(base.gameObject, array[i], false).GetComponent<WfScreenChildren>();
  64. component.parent_mgr = this;
  65. children_dic.Add(array[i], component);
  66. }
  67. }
  68. }