Inheritance: BaseWindowContextData
Exemplo n.º 1
0
        void Awake()
        {
            lbLevelName  = GameUtility.FindDeepChild <UILabel>(this.gameObject, "Label");
            btnLevelItem = GameUtility.FindDeepChild(this.gameObject, "Icon").gameObject;

            UIEventListener.Get(btnLevelItem).onClick = delegate
            {
                ShowWindowData         showData = new ShowWindowData();
                ContextDataLevelDetail context  = new ContextDataLevelDetail();
                context.levelDescription = "Hi Man cool things will be happen.Be busy living or be busy dying. - Fighting for the game world";
                context.levelId          = 10001;
                context.levelName        = lbLevelName.text;
                context.starCount        = starCount;
                showData.contextData     = context;
                UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_LevelDetail, showData);
            };
        }
Exemplo n.º 2
0
        void Awake()
        {
            lbLevelName = GameUtility.FindDeepChild<UILabel>(this.gameObject, "Label");
            btnLevelItem = GameUtility.FindDeepChild(this.gameObject, "Icon").gameObject;

            UIEventListener.Get(btnLevelItem).onClick = delegate
            {
                ShowWindowData showData = new ShowWindowData();
                ContextDataLevelDetail context = new ContextDataLevelDetail();
                context.levelDescription = "Hi Man cool things will be happen.Be busy living or be busy dying. - Fighting for the game world";
                context.levelId = 10001;
                context.levelName = lbLevelName.text;
                context.starCount = starCount;
                showData.contextData = context;
                UICenterMasterManager.Instance.ShowWindow(WindowID.WindowID_LevelDetail, showData);
            };
        }
        public override void ShowWindow(BaseWindowContextData contextData)
        {
            ResetAnimation();
            base.ShowWindow(contextData);
            IsLock = true;
            EnterAnimation(delegate
            {
                IsLock = false;
            });

            ContextDataLevelDetail detail = contextData as ContextDataLevelDetail;

            if (detail != null)
            {
                this.lbLevelDes.text  = detail.levelDescription;
                this.lbLevelName.text = detail.levelName;

                for (int i = 0; i < listStarts.Count; i++)
                {
                    this.listStarts[i].SetActive(i + 1 <= detail.starCount);
                }
            }
        }