Beispiel #1
0
        public void Refresh_Map_Node()
        {
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model;

            if (model._data == null)
            {
                return;
            }
            int num = model.Get_LevelNum(model.curDifficultyType);

            num = Math.Min(num, this.levelNodeList.get_Count());
            for (int i = 0; i < this.levelNodeList.get_Count(); i++)
            {
                this.levelNodeList.get_Item(i).CustomSetActive(false);
            }
            for (int j = 0; j < this.boxNodeList.get_Count(); j++)
            {
                this.boxNodeList.get_Item(j).CustomSetActive(false);
            }
            for (int k = 0; k < num; k++)
            {
                this._show_LevelNode(k, "0", "0", model.Get_LevelStatus(k));
                this._show_BoxNode(k, "0", model.Get_ChestRewardStatus(k), false);
            }
            bool flag = false;

            if (model.lastUnlockLevelIndex >= 0 && model.lastUnlockLevelIndex <= BurnExpeditionController.Max_Level_Index)
            {
                flag = (model.Get_ChestRewardStatus(model.lastUnlockLevelIndex) == 0);
            }
            if (flag)
            {
                this._show_BoxNode(model.lastUnlockLevelIndex, "0", 0, true);
            }
        }
Beispiel #2
0
        public void Refresh_Map_Node()
        {
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model;

            if (model._data != null)
            {
                int num = Math.Min(model.Get_LevelNum(model.curDifficultyType), this.levelNodeList.Count);
                for (int i = 0; i < this.levelNodeList.Count; i++)
                {
                    this.levelNodeList[i].CustomSetActive(false);
                }
                for (int j = 0; j < this.boxNodeList.Count; j++)
                {
                    this.boxNodeList[j].CustomSetActive(false);
                }
                for (int k = 0; k < num; k++)
                {
                    this._show_LevelNode(k, "0", "0", model.Get_LevelStatus(k));
                    this._show_BoxNode(k, "0", model.Get_ChestRewardStatus(k), false);
                }
                bool flag = false;
                if ((model.lastUnlockLevelIndex >= 0) && (model.lastUnlockLevelIndex <= BurnExpeditionController.Max_Level_Index))
                {
                    flag = model.Get_ChestRewardStatus(model.lastUnlockLevelIndex) == COM_LEVEL_STATUS.COM_LEVEL_STATUS_LOCKED;
                }
                if (flag)
                {
                    this._show_BoxNode(model.lastUnlockLevelIndex, "0", COM_LEVEL_STATUS.COM_LEVEL_STATUS_LOCKED, true);
                }
            }
        }
Beispiel #3
0
        private void _Show_PlayerInfo(COMDT_PLAYERINFO info, uint force, int levelIndex, string headurl = "", COMDT_GAME_VIP_CLIENT nobeVip = null)
        {
            this.nameText.text  = string.Format(UT.Bytes2String(info.szName), new object[0]);
            this.levelText.text = string.Format(info.dwLevel.ToString(), new object[0]);
            if (string.IsNullOrEmpty(headurl))
            {
                this.HttpImage.GetComponent <Image>().SetSprite(CUIUtility.s_Sprite_Dynamic_Icon_Dir + Singleton <BurnExpeditionController> .instance.model.GetRandomRobotIcon(levelIndex), this.map_fromScript, true, false, false);
            }
            else
            {
                UT.SetHttpImage(this.HttpImage, headurl);
            }
            Image component = this.enemyNode.transform.FindChild("PlayerIcon/NobeIcon").GetComponent <Image>();
            Image image     = this.enemyNode.transform.FindChild("PlayerIcon/pnlSnsHead/NobeImag").GetComponent <Image>();

            if (nobeVip != null)
            {
                if (component != null)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetNobeIcon(component, (int)nobeVip.dwCurLevel, false);
                }
                if (image != null)
                {
                    MonoSingleton <NobeSys> .GetInstance().SetHeadIconBk(image, (int)nobeVip.dwHeadIconId);
                }
            }
            this.enemy_node_0.CustomSetActive(false);
            this.enemy_node_1.CustomSetActive(false);
            this.enemy_node_2.CustomSetActive(false);
            for (int i = 0; i < info.astChoiceHero.Length; i++)
            {
                COMDT_CHOICEHERO comdt_choicehero = info.astChoiceHero[i];
                if ((comdt_choicehero != null) && (comdt_choicehero.stBaseInfo.stCommonInfo.dwHeroID != 0))
                {
                    this._Show_Enemy_Heros(i, comdt_choicehero.stBaseInfo.stCommonInfo.dwHeroID, string.Empty, comdt_choicehero.stBaseInfo.stCommonInfo.wLevel, comdt_choicehero.stBaseInfo.stCommonInfo.wStar, comdt_choicehero.stBurningInfo.dwBloodTTH, comdt_choicehero.stBaseInfo.stCommonInfo.dwHeroID);
                }
            }
            this.SymbolLevel.CustomSetActive(false);
            for (int j = 0; j < info.astChoiceHero.Length; j++)
            {
                COMDT_CHOICEHERO comdt_choicehero2 = info.astChoiceHero[j];
                if ((comdt_choicehero2 != null) && (comdt_choicehero2.stBaseInfo.stCommonInfo.dwHeroID != 0))
                {
                    int symbolLvWithArray = CSymbolInfo.GetSymbolLvWithArray(comdt_choicehero2.SymbolID);
                    if (symbolLvWithArray > 0)
                    {
                        this.SymbolLevel.CustomSetActive(true);
                        Utility.GetComponetInChild <Text>(this.SymbolLevel, "Text").text = symbolLvWithArray.ToString();
                    }
                    break;
                }
            }
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .instance.model;

            uint[] numArray = model.Get_Buffs(levelIndex);
            this._Show_Buff(this._GetBuffNode(0), (int)numArray[0], false);
            this._Show_Buff(this._GetBuffNode(1), (int)numArray[1], false);
            this._Show_Buff(this._GetBuffNode(2), (int)numArray[2], false);
            this._Show_Buff_Selected_Index(model.curSelect_BuffIndex);
        }
        public static void Finish_Level(int level_index)
        {
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model;

            model.FinishLevel(level_index);
            model.UnLockBox(level_index);
            model.CalcProgress();
        }
Beispiel #5
0
        public void Show_ENEMY(int levelIndex)
        {
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model;

            if (model._data != null)
            {
                this.SetEnemyNodeShow(true);
                this.Show_Enemy(model.Get_ENEMY_TEAM_INFO(model.curDifficultyType, levelIndex), levelIndex);
            }
        }
Beispiel #6
0
        public void Show_Map()
        {
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model;

            if (model._data != null)
            {
                this.Refresh_Map_Node();
                this.SetEnemyNodeShow(false);
                this.Show_ResetNum(model.Get_ResetNum(model.curDifficultyType));
                this.Show_Line(model.lastUnlockLevelIndex);
                if (this.coinText != null)
                {
                    CRoleInfo masterRoleInfo = Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo();

                    if (masterRoleInfo != null)
                    {
                        this.coinText.text = masterRoleInfo.BurningCoin.ToString();
                    }
                }
            }
        }
        public static void Record_EnemyHero_HPInfo(int heroID, uint blood)
        {
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .GetInstance().model;

            COMDT_PLAYERINFO current_Enemy_PlayerInfo = model.Get_Current_Enemy_PlayerInfo();

            for (int i = 0; i < current_Enemy_PlayerInfo.astChoiceHero.Length; i++)
            {
                COMDT_CHOICEHERO cOMDT_CHOICEHERO = current_Enemy_PlayerInfo.astChoiceHero[i];
                if (cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.dwHeroID != 0u && (ulong)cOMDT_CHOICEHERO.stBaseInfo.stCommonInfo.dwHeroID == (ulong)((long)heroID))
                {
                    cOMDT_CHOICEHERO.stBurningInfo.dwBloodTTH = blood;
                    if (blood == 0u)
                    {
                        cOMDT_CHOICEHERO.stBurningInfo.bIsDead = 1;
                    }
                    else
                    {
                        cOMDT_CHOICEHERO.stBurningInfo.bIsDead = 0;
                    }
                }
            }
        }
Beispiel #8
0
 private void _Show_Buff(GameObject node, int buffid, bool bSelected)
 {
     if (buffid == 0)
     {
         node.CustomSetActive(false);
     }
     else
     {
         GameObject obj2            = Utility.FindChild(node, "bg_frame");
         GameObject obj3            = Utility.FindChild(node, "mark");
         Text       componetInChild = Utility.GetComponetInChild <Text>(node, "description");
         obj2.CustomSetActive(bSelected);
         obj3.CustomSetActive(bSelected);
         BurnExpeditionModel model = Singleton <BurnExpeditionController> .instance.model;
         componetInChild.text = model.Get_Buff_Description(buffid);
         Image  image = Utility.GetComponetInChild <Image>(node, "icon");
         string str   = model.Get_Buff_Icon(buffid);
         if ((image != null) && !string.IsNullOrEmpty(str))
         {
             image.SetSprite(str, this.map_fromScript, true, false, false);
         }
     }
 }
Beispiel #9
0
        private void _Show_Buff(GameObject node, int buffid, bool bSelected)
        {
            if (buffid == 0)
            {
                node.CustomSetActive(false);
                return;
            }
            GameObject obj             = Utility.FindChild(node, "bg_frame");
            GameObject obj2            = Utility.FindChild(node, "mark");
            Text       componetInChild = Utility.GetComponetInChild <Text>(node, "description");

            obj.CustomSetActive(bSelected);
            obj2.CustomSetActive(bSelected);
            BurnExpeditionModel model = Singleton <BurnExpeditionController> .get_instance().model;

            componetInChild.text = model.Get_Buff_Description(buffid);
            Image  componetInChild2 = Utility.GetComponetInChild <Image>(node, "icon");
            string text             = model.Get_Buff_Icon(buffid);

            if (componetInChild2 != null && !string.IsNullOrEmpty(text))
            {
                componetInChild2.SetSprite(text, this.map_fromScript, true, false, false, false);
            }
        }
Beispiel #10
0
 public BurnExpeditionController()
 {
     this.model = new BurnExpeditionModel();
     this.view  = new BurnExpeditionView();
 }