private void OnOpenView(MobaMessage msg)
 {
     if (msg != null && this.isRequest)
     {
         MagicBottleData param = (MagicBottleData)msg.Param;
         CtrlManager.OpenWindow(WindowID.BottleSystemView, null);
         MobaMessageManagerTools.SendClientMsg(ClientC2V.OpenBottleView, param, false);
         this.isRequest = false;
     }
 }
        public static MagicBottleData Get_BottleData(this ModelManager mmng)
        {
            MagicBottleData result = null;

            if (mmng != null && mmng.ValidData(EModelType.Model_BottleSystem))
            {
                result = mmng.GetData <MagicBottleData>(EModelType.Model_BottleSystem);
            }
            return(result);
        }
 private void OnOpenView(MobaMessage msg)
 {
     if (msg != null)
     {
         MagicBottleData magicBottleData = (MagicBottleData)msg.Param;
         if (magicBottleData != null)
         {
             this.InitUI();
         }
     }
 }
Exemple #4
0
        private void InitUI()
        {
            this.currLevel          = ModelManager.Instance.Get_BottleData_Level();
            this.currExp            = ModelManager.Instance.Get_BottleData_Exp();
            this.currMaxExp         = (long)Model_BottleSystem.Exp_Max;
            this.loadingBar.value   = (float)this.currExp / (float)this.currMaxExp;
            this.loadingBar.alpha   = (float)((this.loadingBar.value <= 0f) ? 0 : 1);
            this.textBottleExp.text = this.currExp + "/" + this.currMaxExp;
            MagicBottleData magicBottleData = ModelManager.Instance.Get_BottleData();
            int             expball         = (magicBottleData != null) ? magicBottleData.expbottlecount : 0;

            this.Expball = expball;
            this.rule.gameObject.SetActive(false);
            string[] array = LanguageManager.Instance.GetStringById("Bottle_Describe").Split(new char[]
            {
                '|'
            });
            if (array == null)
            {
                return;
            }
            string str  = "[ffcd04]" + array[0];
            string str2 = "[00e1c9]" + array[1];

            this.rule.GetChild(0).GetComponent <UILabel>().text = str + str2;
            GridHelper.FillGrid <BottleSystemDigit>(this.levels, this.bottlesystemdigit, 5, delegate(int idx, BottleSystemDigit comp)
            {
                comp.name = (5 - idx).ToString();
                comp.Init(this.CheckNum(this.currLevel), idx);
            });
            float num = 0f;

            for (int i = this.levels.transform.childCount - 1; i >= 0; i--)
            {
                if (this.levels.transform.GetChild(i).gameObject.activeInHierarchy)
                {
                    this.levels.transform.GetChild(i).GetComponent <BottleSystemDigit>().GPU.lagtime = num;
                    this.levels.transform.GetChild(i).GetComponent <_GPUParticleCtrl>().enabled      = false;
                    num += 0.2f;
                }
            }
            this.levels.Reposition();
        }
        public static int Get_BottleData_CollectorCount(this ModelManager mmng)
        {
            MagicBottleData magicBottleData = mmng.Get_BottleData();

            return(magicBottleData.classicbottle);
        }
        public static int Get_BottleData_LegendCount(this ModelManager mmng)
        {
            MagicBottleData magicBottleData = mmng.Get_BottleData();

            return(magicBottleData.generalbottle);
        }
        public static int Get_BottleData_Award(this ModelManager mmng)
        {
            MagicBottleData magicBottleData = mmng.Get_BottleData();

            return(magicBottleData.drawaward);
        }
        public static long Get_BottleData_Exp(this ModelManager mmng)
        {
            MagicBottleData magicBottleData = mmng.Get_BottleData();

            return(magicBottleData.curexp);
        }
        public static int Get_BottleData_Level(this ModelManager mmng)
        {
            MagicBottleData magicBottleData = mmng.Get_BottleData();

            return(magicBottleData.curlevel);
        }
        public static long Get_BottleData_BottleID(this ModelManager mmng)
        {
            MagicBottleData magicBottleData = mmng.Get_BottleData();

            return(magicBottleData.magicbottleid);
        }