Пример #1
0
        IEnumerator Start()
        {
            /* Create a window container */
            WindowContainer winContainer = WindowContainer.Create("MAIN");

            yield return(null);

            IUIViewLocator locator = Context.GetApplicationContext().GetService <IUIViewLocator>();
            StartupWindow  window  = locator.LoadWindow <StartupWindow>(winContainer, "UI/Startup.prefab");

            window.Create();
            ITransition transition = window.Show().OnStateChanged((w, state) =>
            {
                //log.DebugFormat("Window:{0} State{1}",w.Name,state);
            });

            yield return(transition.WaitForDone());


            //ApplicationContext context = ApplicationContext.GetApplicationContext();
            //ISession session = context.GetService<ISession>();
            //session.Send(10001, -1, new Login() { DriveId = "default" });

            //ApplicationContext context = Context.GetApplicationContext();
            //ISession session = context.GetService<ISession>();
            //session.Connect("127.0.0.1", 10001);
        }
Пример #2
0
        // Start is called before the first frame update
        void Start()
        {
            WindowContainer windowContainer = WindowContainer.Create("MAIN");

            IUIViewLocator locator = applicationContext.GetService <IUIViewLocator>();

            AddAllWindows(windowContainer, locator);

            GameMainWindow startWindow = windowManager.Find <GameMainWindow>();

            startWindow.Create();
            startWindow.Show();
        }
Пример #3
0
    private void Start()
    {
        /* Create a window container */
        WindowContainer winContainer = WindowContainer.Create("main");

        IUIViewLocator  locator = context.GetService <IUIViewLocator>();
        LoadingGameView window  = locator.LoadWindow <LoadingGameView>(winContainer, "UI/popup_loading");

        window.Create();
        window.Show();

        for (int i = 0; i < listPopup.Length; i++)
        {
            SmartPool.Instance.Preload(listPopup[i], 1);
        }
    }
Пример #4
0
        IEnumerator Start()
        {
            /* Create a window container */
            WindowContainer winContainer = WindowContainer.Create("MAIN");

            yield return(null);

            IUIViewLocator locator = context.GetService <IUIViewLocator>();
            StartupWindow  window  = locator.LoadWindow <StartupWindow>(winContainer, "UI/Startup/Startup");

            window.Create();
            ITransition transition = window.Show().OnStateChanged((w, state) =>
            {
                //log.DebugFormat("Window:{0} State{1}",w.Name,state);
            });

            yield return(transition.WaitForDone());
        }
Пример #5
0
        IEnumerator Start()
        {
            /* Create a window container */
            //创建一个窗口容器,默认会在全局窗口管理器中创建
            WindowContainer winContainer = WindowContainer.Create("MAIN");

            yield return(null);

            IUIViewLocator locator = context.GetService <IUIViewLocator>();
            StartupWindow  window  = locator.LoadWindow <StartupWindow>(winContainer, "UI/Startup/Startup");

            window.Create();
            //返回一个transition对象,窗口显示一般会有窗口动画,所以是一个持续过程的操作
            ITransition transition = window.Show().OnStateChanged((w, state) =>
            {
                //log.DebugFormat("Window:{0} State{1}",w.Name,state);
            });

            yield return(transition.WaitForDone());
        }