Наследование: UnityEngine.MonoBehaviour
        public override void InitWindowOnAwake()
        {
            base.InitWindowOnAwake();
            InitWindowCoreData();

            btnStart         = GameUtility.FindDeepChild(this.gameObject, "LevelDetailRight/BtnEnter").gameObject;
            this.lbLevelDes  = GameUtility.FindDeepChild <UILabel>(this.gameObject, "LevelDetailRight/Content/des");
            this.lbLevelName = GameUtility.FindDeepChild <UILabel>(this.gameObject, "levelName");

            this.listStarts.Add(GameUtility.FindDeepChild(this.gameObject, "Stars/star01").gameObject);
            this.listStarts.Add(GameUtility.FindDeepChild(this.gameObject, "Stars/star02").gameObject);
            this.listStarts.Add(GameUtility.FindDeepChild(this.gameObject, "Stars/star03").gameObject);

            twAlpha = this.gameObject.GetComponent <TweenAlpha>();

            UIEventListener.Get(btnStart).onClick = delegate
            {
                // Application.LoadLevel("AnimationCurve");
                GameMonoHelper.GetInstance().LoadGameScene("RealGame-AnimationCurve", false,
                                                           delegate
                {
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_Matching);
                    UICenterMasterManager.Instance.GetGameWindowScript <UIMatching>(WindowID.WindowID_Matching).SetMatchingData(this.ID);
                });
            };
        }
Пример #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()
        {
            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);
                });
            };
        }
Пример #4
0
 private void OnContineBtn(GameObject obj)
 {
     GameMonoHelper.GetInstance().LoadGameScene("RealGame-EmptyScene", true, delegate
     {
         UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_TopBar);
         ShowWindowData showData   = new ShowWindowData();
         showData.checkNavigation  = true;
         showData.ignoreAddNavData = true;
         UICenterMasterManager.Instance.ShowWindow(targetBackWindowId, showData);
     });
 }
Пример #5
0
        public override void InitWindowOnAwake()
        {
            base.InitWindowOnAwake();
            InitWindowCoreData();

            gbWinContent  = GameUtility.FindDeepChild(this.gameObject, "WinContent").gameObject;
            gbLoseContent = GameUtility.FindDeepChild(this.gameObject, "LoseContent").gameObject;

            btnRank        = GameUtility.FindDeepChild(this.gameObject, "LoseContent/Btns/Btn_Rank").gameObject;
            btnSkill       = GameUtility.FindDeepChild(this.gameObject, "LoseContent/Btns/Btn_Skill").gameObject;
            btnLoseContine = GameUtility.FindDeepChild(this.gameObject, "LoseContent/Btns/Btn_Continue").gameObject;
            btnWinContine  = GameUtility.FindDeepChild(this.gameObject, "WinContent/Btn_Continue").gameObject;
            lbResult       = GameUtility.FindDeepChild <UILabel>(this.gameObject, "Msg/Sprite/Label");
            lbResultMsg    = GameUtility.FindDeepChild <UILabel>(this.gameObject, "Msg/Label");

            UIEventListener.Get(btnLoseContine).onClick = OnContineBtn;
            UIEventListener.Get(btnWinContine).onClick  = OnContineBtn;

            UIEventListener.Get(btnSkill).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("RealGame-EmptyScene", true, delegate
                {
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_TopBar);
                    ShowWindowData showData   = new ShowWindowData();
                    showData.checkNavigation  = true;
                    showData.ignoreAddNavData = true;
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_Skill, showData);
                });
            };

            UIEventListener.Get(btnRank).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("RealGame-EmptyScene", true, delegate
                {
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_TopBar);
                    ShowWindowData showData   = new ShowWindowData();
                    showData.checkNavigation  = true;
                    showData.ignoreAddNavData = true;
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_LevelDetail, showData);
                });
            };
        }
Пример #6
0
        public override void InitWindowOnAwake()
        {
            this.windowID = WindowID.WindowID_LevelDetail;
            base.InitWindowOnAwake();
            InitWindowData();

            btnStart = GameUtility.FindDeepChild(this.gameObject, "LevelDetailRight/BtnEnter").gameObject;
            twAlpha  = this.gameObject.GetComponent <TweenAlpha>();

            UIEventListener.Get(btnStart).onClick = delegate
            {
                // Application.LoadLevel("AnimationCurve");
                GameMonoHelper.GetInstance().LoadGameScene("AnimationCurve",
                                                           delegate
                {
                    UIManager.GetInstance().ShowWindow(WindowID.WindowID_Matching);
                    UIManager.GetInstance().GetGameWindowScript <UIMatching>(WindowID.WindowID_Matching).SetMatchingData(this.windowID);
                });
            };
        }
Пример #7
0
        public override void InitWindowOnAwake()
        {
            base.InitWindowOnAwake();
            InitWindowCoreData();

            btnWin  = GameUtility.FindDeepChild(this.gameObject, "BtnWin").gameObject;
            btnLose = GameUtility.FindDeepChild(this.gameObject, "BtnLose").gameObject;
            btnShop = GameUtility.FindDeepChild(this.gameObject, "BtnShop").gameObject;

            // win the game
            // load new scene to show target window
            UIEventListener.Get(btnWin).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("RealGame-EmptyScene", false, delegate
                {
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_MatchResult);
                    UIBaseWindow baseWindow = UICenterMasterManager.Instance.GetGameWindow(WindowID.WindowID_MatchResult);
                    ((UIMatchResult)baseWindow).SetMatchResult(true, targetBackWindowId);
                });
            };

            // lose the game
            // load new scene to show target window
            UIEventListener.Get(btnLose).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("RealGame-EmptyScene", false, delegate
                {
                    UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_MatchResult);
                    UIBaseWindow baseWindow = UICenterMasterManager.Instance.GetGameWindow(WindowID.WindowID_MatchResult);
                    ((UIMatchResult)baseWindow).SetMatchResult(false, targetBackWindowId);
                });
            };

            // show navigation window shop
            UIEventListener.Get(btnShop).onClick = delegate
            {
                UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_Shop);
            };
        }
Пример #8
0
        public override void InitWindowOnAwake()
        {
            this.windowID = WindowID.WindowID_Matching;
            base.InitWindowOnAwake();

            InitWindowData();

            btnWin  = GameUtility.FindDeepChild(this.gameObject, "BtnWin").gameObject;
            btnLose = GameUtility.FindDeepChild(this.gameObject, "BtnLose").gameObject;

            // win the game
            UIEventListener.Get(btnWin).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("TestEmptyScene", delegate
                {
                    // 是否需要一个退出比赛单独接口?
                    // UIManager.GetInstance().ShowWindow(WindowID.WindowID_TopBar);
                    // UIManager.GetInstance().ShowWindow(WindowID.WindowID_LevelDetail);

                    UIManager.GetInstance().ShowWindow(WindowID.WindowID_MatchResult);
                    UIBaseWindow baseWindow = UIManager.GetInstance().GetGameWindow(WindowID.WindowID_MatchResult);
                    ((UIMatchResult)baseWindow).SetMatchResult(true, targetBackWindowId);
                });
            };

            // lose the game
            UIEventListener.Get(btnLose).onClick = delegate
            {
                GameMonoHelper.GetInstance().LoadGameScene("TestEmptyScene", delegate
                {
                    UIManager.GetInstance().ShowWindow(WindowID.WindowID_MatchResult);
                    UIBaseWindow baseWindow = UIManager.GetInstance().GetGameWindow(WindowID.WindowID_MatchResult);
                    ((UIMatchResult)baseWindow).SetMatchResult(false, targetBackWindowId);
                });
            };
        }
 void Awake()
 {
     instance = this;
     DontDestroyOnLoad(this.gameObject);
 }
Пример #10
0
 void Awake()
 {
     instance = this;
     DontDestroyOnLoad(this.gameObject);
 }