Exemplo n.º 1
0
 private void OnJumpToDemo(GameObject go, PointerEventData eventData)
 {
     JResource.LoadSceneAsync("UIDemo.unity", () =>
     {
         UIRootView.InitUIRoot(); //初始化UIRoot是需要的
         UIMgr.Instance.ShowUI(JTestViewPath);
     });
 }
Exemplo n.º 2
0
 private void OnJumpToDemo(GameObject go, PointerEventData eventData)
 {
     if (_rootPrefab == null)
     {
         return;
     }
     JResource.LoadSceneAsync("UIDemo.unity", () =>
     {
         GameObject root = GameObject.Instantiate(_rootPrefab);
         var uiroot      = JBehaviour.CreateOn <UIRootView>(root);
         UIMgr.Instance.ShowUI(JTestViewPath);
     });
 }
Exemplo n.º 3
0
        //private JTestItem testItem;

        /// <summary>
        /// 注册函数,相当于Awake
        /// </summary>
        public override void Init()
        {
            base.Init();

            JBtnButton = UIUtility.BindClickEvent(Trans, "JBtnButton", OnClick);

            UIUtility.BindClickEvent(Trans, "BackButton", (obj, data) =>
            {
                JResource.LoadSceneAsync("Game.unity");
            });

            //注册子部件
            //JTestItem item = UIUtility.CreateItemNoClone<JTestItem>(Trans, "子部件名字");
        }