ScenePrivateEventModeAwake.cs 1.9 KB

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