SceneScoutScreenManager.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using System;
  2. using System.Collections.Generic;
  3. namespace scoutmode
  4. {
  5. public class SceneScoutScreenManager : WfScreenManager
  6. {
  7. public ADVKagManager advKag
  8. {
  9. get
  10. {
  11. return GameMain.Instance.ScriptMgr.adv_kag;
  12. }
  13. }
  14. public WfScreenMoveChildren moveScreen { get; private set; }
  15. public override void Start()
  16. {
  17. base.Start();
  18. this.moveScreen = base.children_dic["Move"].GetComponent<WfScreenMoveChildren>();
  19. string empty = string.Empty;
  20. string empty2 = string.Empty;
  21. if (this.advKag.tag_backup != null && this.advKag.tag_backup.Count > 0)
  22. {
  23. this.backupTag = new Dictionary<string, string>(this.advKag.tag_backup);
  24. NDebug.Assert(this.advKag.tag_backup.ContainsKey("name") && this.advKag.tag_backup["name"].ToLower() == "SceneScout".ToLower(), "シーン名SceneScoutの名前が不正です");
  25. NDebug.Assert(this.advKag.tag_backup.ContainsKey("label"), "SceneCallにlabelの設定がされていませんでした");
  26. NDebug.Assert(this.advKag.tag_backup.ContainsKey("start_label"), "SceneCallにstart_labelの設定がされていませんでした");
  27. NDebug.Assert(this.advKag.tag_backup.ContainsKey("add_label"), "SceneCallにadd_labelの設定がされていませんでした");
  28. ScoutMainScreenManager component = base.children_dic["Main"].GetComponent<ScoutMainScreenManager>();
  29. if (this.advKag.tag_backup.ContainsKey("create_return"))
  30. {
  31. component.OnAddedScoutMaidReturned();
  32. }
  33. this.CallScreen("Main");
  34. return;
  35. }
  36. this.advKag.LoadScriptFile("debug_scourt.ks", "*シーンコール");
  37. this.advKag.kag.Exec();
  38. }
  39. public void CallAddScoutCharacter(WfScreenChildren finishScreen)
  40. {
  41. this.moveScreen.SetNextLabel(this.backupTag["add_label"]);
  42. finishScreen.Finish();
  43. }
  44. public void CallStart(WfScreenChildren finishScreen)
  45. {
  46. this.moveScreen.SetNextLabel(this.backupTag["start_label"]);
  47. finishScreen.Finish();
  48. }
  49. public void CallExist(WfScreenChildren finishScreen)
  50. {
  51. this.moveScreen.SetNextLabel(this.backupTag["label"]);
  52. finishScreen.Finish();
  53. }
  54. protected override void SettingChildrenList(Dictionary<string, WfScreenChildren> childrenDic)
  55. {
  56. foreach (string text in new string[]
  57. {
  58. "Main",
  59. "Move"
  60. })
  61. {
  62. WfScreenChildren component = UTY.GetChildObject(base.gameObject, text, false).GetComponent<WfScreenChildren>();
  63. component.parent_mgr = this;
  64. childrenDic.Add(text, component);
  65. }
  66. }
  67. public Dictionary<string, string> backupTag = new Dictionary<string, string>();
  68. }
  69. }