Example #1
0
 public UIManager()
 {
     mGameManager                = GameManager.Instance;
     currentSceneUIDict          = new Dictionary <string, GameObject>();
     mUIFacade                   = new UIFacade(this);
     mUIFacade.currentSceneState = new StartLoadSceneState(mUIFacade); // 初始化状态为加载状态
 }
Example #2
0
 public UIManager()
 {
     gameManager           = GameManager.Instance;
     currentScenePanelDict = new Dictionary <string, GameObject>();
     uiFacade = new UIFacade(this);                                  //把自身传递给UIFacade
     uiFacade.currentSceneState = new StartLoadSceneState(uiFacade); //设置初始状态
 }
Example #3
0
 private void Awake()
 {
     if (Singleton != null)
     {
         DestroyImmediate(gameObject);
     }
     else
     {
         Singleton = this;
     }
 }
Example #4
0
    void OnGUI()
    {
        if (GUILayout.Button("加载TestUI"))
        {
            UIFacade.NewFacade <TestUIFacade>();
        }

        if (GUILayout.Button("移除TestUI"))
        {
            UIFacade.RemoveFacade <TestUIFacade>();
        }
    }
Example #5
0
        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();
        }
Example #6
0
    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();
    }
Example #7
0
    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();
    }
Example #8
0
    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();
    }
Example #9
0
 private void OnRestartBtnClicked()
 {
     UIFacade.HideUI(UIDef.FAILED);
     SceneFacade.LoadSceneAsync?.Invoke(SceneManager.GetActiveScene().name);
 }
Example #10
0
 public BossOptionSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #11
0
 public GameLoadSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #12
0
 public BosslGameOptionSceneState(UIFacade uIFacade) : base(uIFacade)
 {
 }
 public NormalModelSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #14
0
 protected virtual void Awake()
 {
     uiFacade = GameManager.Instance.uiManager.uiFacade;
 }
Example #15
0
 public GamePlaySceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #16
0
 public override void Execute()
 {
     UIFacade.GameOver();
     ControllerFacade.GameOver();
 }
Example #17
0
 public GanttXMLSaver(GanttProject project, TaskTreeUIFacade taskTree, GanttResourcePanel peop, GanttGraphicArea area, UIFacade uIFacade)
 {
     this.area = area;
     myProject = project;
 }
Example #18
0
 public NormalOptionSceneState(UIFacade uIFacade) : base(uIFacade)
 {
 }
Example #19
0
 private void OnBackBtnClicked()
 {
     UIFacade.HideUI(UIDef.FAILED);
     SceneFacade.LoadSceneAsync?.Invoke("Start");
 }
Example #20
0
 public BaseSceneState(UIFacade uiFacade)
 {
     mUIFacade = uiFacade;
 }
Example #21
0
 public MainSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #22
0
 public NormalGameOptionSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
 public MonsterNestSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #24
0
 protected virtual void Awake()
 {
     mUIFacade = GameManager.Instance.UIManager.mUIFacade;
 }
Example #25
0
 public BaseSceneState(UIFacade uiFacade)
 {
     this.uiFacade = uiFacade;
 }
 public StartLoadSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #27
0
 private void Awake()
 {
     UIFacade.SetUIScript(this);
 }
Example #28
0
 public BossModelSceneState(UIFacade uiFacade) : base(uiFacade)
 {
 }
Example #29
0
 private void OnCloseBtnClicked()
 {
     UIFacade.HideUI(UIDef.PAUSE);
 }