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() { 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); }); }; }
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); }