public UIManager() { mGameManager = GameManager.Instance; currentSceneUIDict = new Dictionary <string, GameObject>(); mUIFacade = new UIFacade(this); mUIFacade.currentSceneState = new StartLoadSceneState(mUIFacade); // 初始化状态为加载状态 }
public UIManager() { gameManager = GameManager.Instance; currentScenePanelDict = new Dictionary <string, GameObject>(); uiFacade = new UIFacade(this); //把自身传递给UIFacade uiFacade.currentSceneState = new StartLoadSceneState(uiFacade); //设置初始状态 }
private void Awake() { if (Singleton != null) { DestroyImmediate(gameObject); } else { Singleton = this; } }
void OnGUI() { if (GUILayout.Button("加载TestUI")) { UIFacade.NewFacade <TestUIFacade>(); } if (GUILayout.Button("移除TestUI")) { UIFacade.RemoveFacade <TestUIFacade>(); } }
public void Load() { var filename = @"D:\Repos\GanttProjectDotNet\test.gan"; var doc = XDocument.Load(filename); myProject = new GanttProject(); area = new GanttGraphicArea(); myFacadeUI = new UIFacade(); myProject.ProjectName = doc.Root.GetAttribute(Constants.NameAttribute); myProject.Organization = doc.Root.GetAttribute(Constants.OrganizationAttribute); myProject.MyWebLink = doc.Root.GetAttribute(Constants.MyWebLinkAttribute); area.StartDate = doc.Root.GetAttribute(Constants.AreaStartDateAttribute); if (doc.Root.Attribute(Constants.MyFacadeUIViewIndexAttribute) != null) { myFacadeUI.ViewIndex = doc.Root.GetAttributeINT(Constants.MyFacadeUIViewIndexAttribute); } if (doc.Root.Attribute(Constants.MyFacadeUIGanttDividerLocationAttribute) != null) { myFacadeUI.GanttDividerLocation = doc.Root.GetAttributeINT(Constants.MyFacadeUIGanttDividerLocationAttribute); } if (doc.Root.Attribute(Constants.MyFacadeUIResourceDividerLocationAttribute) != null) { myFacadeUI.ResourceDividerLocation = doc.Root.GetAttributeINT(Constants.MyFacadeUIResourceDividerLocationAttribute); } VERSION = doc.Root.GetAttribute(Constants.VERSIONAttribute); LANGUAGE = doc.Root.GetAttribute(Constants.LANGUAGEAttribute); ////// See https://bugs.openjdk.java.net/browse/JDK-8133452 //if (!String.IsNullOrEmpty(myProject.Description)) // root.AddElement("description", myProject.Description, true); myProject.Description = doc.Root.Element(Constants.DescriptionElement).GetElementValue(Constants.DescriptionElement, true); //saveViews(handler); //emptyComment(handler); //saveCalendar(handler); //saveTasks(handler); //saveResources(handler); //saveAssignments(handler); //saveVacations(handler); //saveHistory(handler); //saveRoles(handler); //endElement("project", handler); //handler.endDocument(); //stream.close(); }
public static void RegisterWindowTools(Transform _parent) { GameObject goWindowTools = Resources.Load <GameObject>("ui/tootWindowTools"); GameObject cloneWindowTools = GameObject.Instantiate(goWindowTools); Transform tsWindowTools = cloneWindowTools.transform; tsWindowTools.SetParent(_parent); tsWindowTools.position = Vector3.zero; tsWindowTools.rotation = Quaternion.identity; tsWindowTools.localScale = Vector3.one; UIFacade facade = cloneWindowTools.GetComponent <UIFacade>(); facade.Register(); }
void OnDestroy() { Debug.Log("--------------- OnDestroy ------------------------"); proxyLua.DoOnDestroy(); proxyXR.DoOnDestroy(); //framework.modelCenter.Cancel(SampleModel.NAME); //framework.viewCenter.Cancel(SampleView.NAME); //framework.controllerCenter.Cancel(SampleController.NAME); //framework.serviceCenter.Cancel(SampleService.NAME); foreach (Transform child in this.transform.Find("UIFacades")) { UIFacade facade = child.GetComponent <UIFacade>(); facade.Cancel(); } release(); }
void Awake() { Debug.Log("--------------- Awake ------------------------"); proxyLua = new LuaProxy(); proxyLua.AddSearchPath(Application.persistentDataPath); string lua = proxyLua.ReadFile(System.IO.Path.Combine(Application.streamingAssetsPath, "root.lua")); proxyLua.UseRootCode(lua); proxyXR.DoAwake(); GameObject objMT = new GameObject("_MT_"); runtimetMT = objMT.AddComponent <RuntimeMT>(); runtimetMT.mvcs = this; foreach (Transform child in this.transform.Find("UIFacades")) { UIFacade facade = child.GetComponent <UIFacade>(); facade.Register(); } initialize(); // bootloader BootloaderView viewBootloader = new BootloaderView(); framework.viewCenter.Register(BootloaderView.NAME, viewBootloader); controllerBootloader = new BootloaderBatchController(); controllerBootloader.onFinish = runRom; framework.controllerCenter.Register(BootloaderBatchController.NAME, controllerBootloader); modelBootloader = new BootloaderModel(); framework.modelCenter.Register(BootloaderModel.NAME, modelBootloader); proxyLua.DoAwake(); }
private void OnRestartBtnClicked() { UIFacade.HideUI(UIDef.FAILED); SceneFacade.LoadSceneAsync?.Invoke(SceneManager.GetActiveScene().name); }
public BossOptionSceneState(UIFacade uiFacade) : base(uiFacade) { }
public GameLoadSceneState(UIFacade uiFacade) : base(uiFacade) { }
public BosslGameOptionSceneState(UIFacade uIFacade) : base(uIFacade) { }
public NormalModelSceneState(UIFacade uiFacade) : base(uiFacade) { }
protected virtual void Awake() { uiFacade = GameManager.Instance.uiManager.uiFacade; }
public GamePlaySceneState(UIFacade uiFacade) : base(uiFacade) { }
public override void Execute() { UIFacade.GameOver(); ControllerFacade.GameOver(); }
public GanttXMLSaver(GanttProject project, TaskTreeUIFacade taskTree, GanttResourcePanel peop, GanttGraphicArea area, UIFacade uIFacade) { this.area = area; myProject = project; }
public NormalOptionSceneState(UIFacade uIFacade) : base(uIFacade) { }
private void OnBackBtnClicked() { UIFacade.HideUI(UIDef.FAILED); SceneFacade.LoadSceneAsync?.Invoke("Start"); }
public BaseSceneState(UIFacade uiFacade) { mUIFacade = uiFacade; }
public MainSceneState(UIFacade uiFacade) : base(uiFacade) { }
public NormalGameOptionSceneState(UIFacade uiFacade) : base(uiFacade) { }
public MonsterNestSceneState(UIFacade uiFacade) : base(uiFacade) { }
protected virtual void Awake() { mUIFacade = GameManager.Instance.UIManager.mUIFacade; }
public BaseSceneState(UIFacade uiFacade) { this.uiFacade = uiFacade; }
public StartLoadSceneState(UIFacade uiFacade) : base(uiFacade) { }
private void Awake() { UIFacade.SetUIScript(this); }
public BossModelSceneState(UIFacade uiFacade) : base(uiFacade) { }
private void OnCloseBtnClicked() { UIFacade.HideUI(UIDef.PAUSE); }