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); }); }; }
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); }); }; }
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); }); }; }
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); }); }; }
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."); }
private void OnBtnSwitch(GameObject obj) { if (base.isShown) { UIRankManager.GetInstance().HideWindow(windowID, null); } else { UIRankManager.GetInstance().ShowWindow(windowID, null); } }
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."); }
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(); } }); }
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(); } }); }
private void OnBtnClose(GameObject gb) { UIRankManager.GetInstance().HideWindow(windowID); }
protected override void Awake() { base.Awake(); instance = this; }