Inheritance: UIManagerBase
示例#1
0
        public override void InitWindowOnAwake()
        {
            this.windowID = WindowID.WindowID_Rank;
            this.preWindowID = WindowID.WindowID_MainMenu;
            InitWindowData();
            base.InitWindowOnAwake();

            // this.RegisterReturnLogic(RetrunPreLogic);

            objEffect = GameUtility.FindDeepChild(this.gameObject, "EffectParent");
            itemsGrid = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain/Scroll View/Grid");
            trsAnimation = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain");
            scrollView = GameUtility.FindDeepChild<UIScrollView>(this.gameObject, "LeftAnchor/LeftMain/Scroll View");
            btnGoToMatch = GameUtility.FindDeepChild(this.gameObject, "Btn_GotoMatch").gameObject;
            
            rankWindowManager = this.gameObject.GetComponent<UIRankManager>();
            if (rankWindowManager == null)
            {
                rankWindowManager = this.gameObject.AddComponent<UIRankManager>();
                rankWindowManager.InitWindowManager();
            }

            UIEventListener.Get(btnGoToMatch).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("AnimationCurve",
                    delegate
                    {
                        UIManager.GetInstance().ShowWindow(WindowID.WindowID_Matching);
                        UIManager.GetInstance().GetGameWindowScript<UIMatching>(WindowID.WindowID_Matching).SetMatchingData(this.windowID);
                    });
            };
        }
示例#2
0
        public override void InitWindowOnAwake()
        {
            InitWindowCoreData();
            base.InitWindowOnAwake();
            itemsGrid    = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain/Scroll View/Grid");
            trsAnimation = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain");
            scrollView   = GameUtility.FindDeepChild <UIScrollView>(this.gameObject, "LeftAnchor/LeftMain/Scroll View");
            btnGoToMatch = GameUtility.FindDeepChild(this.gameObject, "Btn_GotoMatch").gameObject;

            rankWindowManager = this.gameObject.GetComponent <UIRankManager>();
            if (rankWindowManager == null)
            {
                rankWindowManager = this.gameObject.AddComponent <UIRankManager>();
                rankWindowManager.InitWindowManager();
            }

            // Just go to Game scene logic
            UIEventListener.Get(btnGoToMatch).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("RealGame-AnimationCurve", false,
                                                           delegate
                {
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_Matching);
                    UICenterMasterManager.Instance.GetGameWindowScript <UIMatching>(WindowID.WindowID_Matching).SetMatchingData(this.ID);
                });
            };
        }
示例#3
0
        public override void InitWindowOnAwake()
        {
            InitWindowCoreData();
            base.InitWindowOnAwake();
            itemsGrid = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain/Scroll View/Grid");
            trsAnimation = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain");
            scrollView = GameUtility.FindDeepChild<UIScrollView>(this.gameObject, "LeftAnchor/LeftMain/Scroll View");
            btnGoToMatch = GameUtility.FindDeepChild(this.gameObject, "Btn_GotoMatch").gameObject;

            rankWindowManager = this.gameObject.GetComponent<UIRankManager>();
            if (rankWindowManager == null)
            {
                rankWindowManager = this.gameObject.AddComponent<UIRankManager>();
                rankWindowManager.InitWindowManager();
            }

            // Just go to Game scene logic
            UIEventListener.Get(btnGoToMatch).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("RealGame-AnimationCurve", false,
                    delegate
                    {
                        UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_Matching);
                        UICenterMasterManager.Instance.GetGameWindowScript<UIMatching>(WindowID.WindowID_Matching).SetMatchingData(this.ID);
                    });
            };
        }
示例#4
0
        public override void InitWindowOnAwake()
        {
            this.windowID    = WindowID.WindowID_Rank;
            this.preWindowID = WindowID.WindowID_MainMenu;
            InitWindowData();
            base.InitWindowOnAwake();

            // this.RegisterReturnLogic(RetrunPreLogic);

            objEffect    = GameUtility.FindDeepChild(this.gameObject, "EffectParent");
            itemsGrid    = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain/Scroll View/Grid");
            trsAnimation = GameUtility.FindDeepChild(this.gameObject, "LeftAnchor/LeftMain");
            scrollView   = GameUtility.FindDeepChild <UIScrollView>(this.gameObject, "LeftAnchor/LeftMain/Scroll View");
            btnGoToMatch = GameUtility.FindDeepChild(this.gameObject, "Btn_GotoMatch").gameObject;

            rankWindowManager = this.gameObject.GetComponent <UIRankManager>();
            if (rankWindowManager == null)
            {
                rankWindowManager = this.gameObject.AddComponent <UIRankManager>();
                rankWindowManager.InitWindowManager();
            }

            UIEventListener.Get(btnGoToMatch).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("AnimationCurve",
                                                           delegate
                {
                    UIManager.GetInstance().ShowWindow(WindowID.WindowID_Matching);
                    UIManager.GetInstance().GetGameWindowScript <UIMatching>(WindowID.WindowID_Matching).SetMatchingData(this.windowID);
                });
            };
        }
示例#5
0
        public void OnBtnClick(GameObject obj)
        {
            // To show Rank logic's child window(Rank_Detail)
            UIRankManager.GetInstance().ShowWindow(WindowID.WindowID_Rank_Detail);
            UIRankDetail detail = (UIRankDetail)UIRankManager.GetInstance().GetGameWindow(WindowID.WindowID_Rank_Detail);

            detail.UpdateDetailData(lbItemName.text, spIcon.spriteName);
            Debuger.Log("<color=green>[##UIRank##]</color> UIRank Item clicked to show the Rank_Detail window.");
        }
示例#6
0
 private void OnBtnSwitch(GameObject obj)
 {
     if (base.isShown)
     {
         UIRankManager.GetInstance().HideWindow(windowID, null);
     }
     else
     {
         UIRankManager.GetInstance().ShowWindow(windowID, null);
     }
 }
示例#7
0
        public void OnBtnClick(GameObject obj)
        {
            // item 被点击

            UIRankManager.GetInstance().ShowWindow(WindowID.WindowID_Rank_Detail);
            UIRankDetail detail = (UIRankDetail)UIRankManager.GetInstance().GetGameWindow(WindowID.WindowID_Rank_Detail);

            detail.UpdateDetailData(lbItemName.text, spIcon.spriteName);

            Debug.Log("Item clicked.");
        }
示例#8
0
 public override void HideWindow(Action onComplete)
 {
     // Hide target child window
     UIRankManager.GetInstance().HideWindow(WindowID.WindowID_Rank_OwnDetail, null);
     QuitAnimation(delegate
     {
         NGUITools.SetActive(this.gameObject, false);
         if (onComplete != null)
         {
             onComplete();
         }
     });
 }
示例#9
0
 public override void HideWindow(Action onComplete)
 {
     // 隐藏主界面,可以选择性隐藏子界面
     UIRankManager.GetInstance().HideWindow(WindowID.WindowID_Rank_OwnDetail, null);
     QuitAnimation(delegate
     {
         Debug.Log("UIRank window's Hide animation is over");
         NGUITools.SetActive(this.gameObject, false);
         if (onComplete != null)
         {
             onComplete();
         }
     });
 }
示例#10
0
 private void OnBtnClose(GameObject gb)
 {
     UIRankManager.GetInstance().HideWindow(windowID);
 }
示例#11
0
 protected override void Awake()
 {
     base.Awake();
     instance = this;
 }
示例#12
0
 protected override void Awake()
 {
     base.Awake();
     instance = this;
 }