Ejemplo n.º 1
0
        private bool CreateBasicTabContent()
        {
            bool flag1 = true;

            foreach (TipsParam data in (IEnumerable <TipsParam>)((IEnumerable <TipsParam>)MonoSingleton <GameManager> .Instance.MasterParam.Tips).OrderBy <TipsParam, int>((Func <TipsParam, int>)(t => t.order)))
            {
                GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.BasicTemplate);
                TipsItem   component  = (TipsItem)gameObject.GetComponent <TipsItem>();
                bool       hide       = data.hide;
                bool       flag2      = MonoSingleton <GameManager> .Instance.Tips.Contains(data.iname);

                if (!hide && !flag2)
                {
                    flag1 = false;
                }
                component.IsCompleted = flag2;
                component.IsHidden    = hide && !flag2;
                component.Title       = !hide || flag2 ? data.title : data.cond_text;
                gameObject.get_transform().SetParent(this.BasicHolder, false);
                gameObject.SetActive(true);
                DataSource.Bind <TipsParam>(gameObject, data);
                this.mTipsItems.Add(gameObject);
                component.UpdateContent();
            }
            return(flag1);
        }
Ejemplo n.º 2
0
        private void Refresh()
        {
            if (this.mCurrentTabType != BeginnerTop.TabType.Basic)
            {
                return;
            }
            bool flag1 = true;

            using (List <GameObject> .Enumerator enumerator = this.mTipsItems.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    TipsItem  component   = (TipsItem)enumerator.Current.GetComponent <TipsItem>();
                    TipsParam dataOfClass = DataSource.FindDataOfClass <TipsParam>(((Component)component).get_gameObject(), (TipsParam)null);
                    bool      hide        = dataOfClass.hide;
                    bool      flag2       = MonoSingleton <GameManager> .Instance.Tips.Contains(dataOfClass.iname);

                    if (!hide && !flag2)
                    {
                        flag1 = false;
                    }
                    component.IsCompleted = flag2;
                    component.IsHidden    = hide && !flag2;
                    component.Title       = !hide || flag2 ? dataOfClass.title : dataOfClass.cond_text;
                    component.UpdateContent();
                }
            }
            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.BadgeTips, (UnityEngine.Object)null))
            {
                return;
            }
            this.BadgeTips.SetActive(!flag1);
        }