public override void Init()
 {
     base.Init();
     for (int i = 0; i < windows.Count; i++)
     {
         var cloned = Instantiate(windows[i], windowsRoot);
         windowsDict[cloned.Id] = cloned;
         cloned.gameObject.SetActive(cloned.WindowState == WindowState.Opened);
         cloned.Init();
     }
     OnWindowsLoaded?.Invoke();
 }
예제 #2
0
 public override void Init()
 {
     base.Init();
     for (int i = 0; i < Storage.Windows.Count; i++)
     {
         var window = Storage.Windows[i];
         if (!windows.ContainsKey(window.Id))
         {
             var clone = Instantiate(window, windowsRoot);
             windows.Add(clone.Id, clone);
             clone.Init();
             clone.gameObject.SetActive(clone.WindowState == WindowState.Opened);
         }
     }
     OnWindowsLoaded?.Invoke();
 }