Ejemplo n.º 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);
                });
            };
        }
Ejemplo n.º 2
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);
                    });
            };
        }
Ejemplo n.º 3
0
 private void OnBtnSwitch(GameObject obj)
 {
     if (base.isShown)
     {
         UIRankManager.GetInstance().HideWindow(windowID, null);
     }
     else
     {
         UIRankManager.GetInstance().ShowWindow(windowID, null);
     }
 }
Ejemplo n.º 4
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.");
        }
Ejemplo n.º 5
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();
         }
     });
 }
Ejemplo n.º 6
0
 private void OnBtnClose(GameObject gb)
 {
     UIRankManager.GetInstance().HideWindow(windowID);
 }
Ejemplo n.º 7
0
 protected override void Awake()
 {
     base.Awake();
     instance = this;
 }
Ejemplo n.º 8
0
 protected override void Awake()
 {
     base.Awake();
     instance = this;
 }