Example #1
0
    private void ShowNextMonsterData()
    {
        this.ngTX_MONS_NEXT_NAME.text  = this.data.md_next.monsterMG.monsterName;
        this.ngTX_MONS_NEXT_SKILL.text = MonsterTribeData.GetTribeName(this.data.md_next.monsterMG.tribe);
        this.specificTypeName.text     = MonsterSpecificTypeData.GetSpecificTypeName(this.data.md_next.monsterMG.monsterStatusId);
        int num = 0;

        if (this.evolutionType == "1" || this.evolutionType == "3" || this.evolutionType == "4")
        {
            string monsterId = this.data.md_next.monsterM.monsterId;
            num = EvolutionData.CalcClusterForEvolve(monsterId);
        }
        else if (this.evolutionType == "5")
        {
            string monsterId2 = this.data.md.monsterM.monsterId;
            num = EvolutionData.CalcClusterForVersionUp(monsterId2);
        }
        else if (this.evolutionType == "2")
        {
            string monsterId3 = this.data.md_next.monsterM.monsterId;
            num = EvolutionData.CalcClusterForModeChange(monsterId3);
        }
        this.ngTX_NEED_CHIP.text = StringFormat.Cluster(num);
        int num2 = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney);

        if (num2 < num)
        {
            this.ngTX_NEED_CHIP.color = Color.red;
        }
    }
Example #2
0
 private void ShowMATInfo()
 {
     if (0 < this.selecterPartnerDigimons.Count && this.selecterPartnerDigimons[0] != null)
     {
         MonsterData monsterData = this.selecterPartnerDigimons[0];
         this.materialMonsterBasicInfo.SetMonsterData(monsterData);
         this.materialMonsterSuccessionSkill.SetSkill(monsterData);
         int num = this.CalcClusterForSuccession(this.baseDigimon, this.selecterPartnerDigimons);
         this.useClusterLabel.text = StringFormat.Cluster(num);
         if (num > int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney))
         {
             this.useClusterLabel.color = Color.red;
         }
         else
         {
             this.useClusterLabel.color = Color.white;
         }
         bool active = MonsterStatusData.IsVersionUp(monsterData.GetMonsterMaster().Simple.rare);
         this.materialMonsterSkillTab2.SetActive(active);
         this.FunctionPartnerDigimonSkill1();
     }
     else
     {
         this.materialMonsterBasicInfo.ClearMonsterData();
         this.materialMonsterSuccessionSkill.ClearSkill();
         this.useClusterLabel.text  = "0";
         this.useClusterLabel.color = Color.white;
         this.materialMonsterSkillTab1.Off();
         this.materialMonsterSkillTab2.Off();
         this.materialMonsterSkillTab2.SetActive(false);
     }
 }
    private void SetParams()
    {
        if (DataMng.Instance().RespDataUS_PlayerInfo == null || DataMng.Instance().RespDataUS_PlayerInfo.playerInfo == null)
        {
            return;
        }
        GameWebAPI.RespDataUS_GetPlayerInfo.PlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo;
        this.userName.text = playerInfo.nickname;
        TitleDataMng.SetTitleIcon(playerInfo.titleId, this.titleIcon);
        UserStamina componentInChildren = this.userStaminaPrefabFolder.Target.GetComponentInChildren <UserStamina>();

        if (null != componentInChildren)
        {
            componentInChildren.RefreshParams();
        }
        this.userDigiStone.text            = playerInfo.point.ToString();
        this.userCluster.text              = StringFormat.Cluster(playerInfo.gamemoney);
        this.userMeat.text                 = string.Format(StringMaster.GetString("SystemFraction"), playerInfo.meatNum, playerInfo.meatLimitMax);
        this.stoneShopButton.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
        {
            if (flag)
            {
                this.OpenStoneShop();
            }
        };
    }
 public void SetPlayerInfo()
 {
     GameWebAPI.RespDataUS_GetPlayerInfo.PlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo;
     this.stoneNum.text     = playerInfo.point.ToString();
     this.clusterNum.text   = StringFormat.Cluster(playerInfo.gamemoney);
     this.buildCostNum.text = string.Format(StringMaster.GetString("SystemFraction"), FarmUtility.GetBuildFacilityCount(), 2);
 }
Example #5
0
 private void ShowMATInfo_0()
 {
     if (this.baseDetail != null && this.baseDetail.gameObject.activeSelf)
     {
         this.baseDetail.ShowMATInfo(this.baseDigimon);
         this.costTip.text = StringFormat.Cluster(this.CalcCluster());
     }
 }
Example #6
0
 protected virtual void ShowMATInfo_1()
 {
     if (this.partnerDetail != null && this.partnerDetail.gameObject.activeSelf)
     {
         this.partnerDetail.ShowMATInfo(this.partnerDigimon);
         this.costTip.text = StringFormat.Cluster(this.CalcCluster());
     }
 }
Example #7
0
        private void OnPushed()
        {
            CMD_SaleCheck cmd_SaleCheck = GUIMain.ShowCommonDialog(new Action <int>(this.OnClosedSaleCheckDialog), "CMD_SaleCheck", null) as CMD_SaleCheck;
            List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList> saleChipList = this.parentWindow.GetSaleChipList();
            int salePrice = this.parentWindow.GetSalePrice();

            cmd_SaleCheck.SetParams(saleChipList, StringFormat.Cluster(salePrice));
        }
    private void ShowInfo()
    {
        GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dungeon = this.dungeonData.dungeon;
        ClassSingleton <PartyBossIconsAccessor> .Instance.StageEnemies = dungeon.encountEnemies;
        this.ngTX_A_STAGE_DNG_NUMBER.text   = this.dungeonNo;
        this.ngTX_A_STAGE_DNG_TITLE.text    = this.dungeonData.worldDungeonM.name;
        this.ngTX_A_STAGE_DNG_DESCRIPT.text = this.dungeonData.worldDungeonM.description;
        this.getEXPLabel.text     = dungeon.exp.ToString();
        this.getClusterLabel.text = StringFormat.Cluster(dungeon.money);
        int num = 0;
        int i;

        for (i = 0; i < dungeon.encountEnemies.Length; i++)
        {
            if (num >= this.goENCOUNT_MONS_LIST.Count)
            {
                break;
            }
            GameWebAPI.RespDataWD_GetDungeonInfo.EncountEnemy encountEnemy = dungeon.encountEnemies[i];
            if (encountEnemy.type == 2 || encountEnemy.type == 4)
            {
                string text = encountEnemy.monsterId.ToString();
                if (!string.IsNullOrEmpty(text))
                {
                    MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(text);
                    if (monsterData != null)
                    {
                        GUIMonsterIcon  guimonsterIcon  = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, this.goENCOUNT_MONS_LIST[num].transform.parent, true, false);
                        DepthController depthController = guimonsterIcon.GetDepthController();
                        depthController.AddWidgetDepth(guimonsterIcon.transform, 40);
                        guimonsterIcon.SetTouchAct_S(delegate(MonsterData tappedMonsterData)
                        {
                            this.ActCallBackEncMons(tappedMonsterData, encountEnemy.resistanceId);
                        });
                        this.goENCOUNT_MONS_LIST[num].SetActive(false);
                        num++;
                    }
                }
            }
        }
        if (this.dungeonData.dungeon.isExtraWave == 1 && num < this.goENCOUNT_MONS_LIST.Count)
        {
            GUIMonsterIcon guimonsterIcon2 = GUIMonsterIcon.MakeQuestionPrefab(this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, (int)(this.goENCOUNT_MONS_LIST[num].transform.localPosition.z + 35f), this.goENCOUNT_MONS_LIST[num].transform.parent);
            guimonsterIcon2.SetTouchAct_S(null);
            guimonsterIcon2.SetTouchAct_L(null);
        }
        while (i < this.goENCOUNT_MONS_LIST.Count)
        {
            this.goENCOUNT_MONS_LIST[i].SetActive(false);
            i++;
        }
        this.ShowDropItems();
        this.goContentsROOT.SetActive(true);
        this.goPointContentsROOT.SetActive(true);
        this.bonusPointUI.Initialize(this.areaId, this.dungeonData.worldDungeonM.worldStageId, this.dungeonData.worldDungeonM.worldDungeonId);
        this.bonusPointUI.SetBonusUI();
    }
Example #9
0
    public void ShowDatas()
    {
        GameWebAPI.RespDataUS_GetPlayerInfo.PlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo;
        this.lbTX_Stone.text   = playerInfo.point.ToString();
        this.lbTX_Chip.text    = StringFormat.Cluster(playerInfo.gamemoney);
        this.lbTX_Meat.text    = string.Format(StringMaster.GetString("SystemFraction"), playerInfo.meatNum, playerInfo.meatLimitMax);
        this.lbTX_HQ_Meat.text = Singleton <UserDataMng> .Instance.GetUserItemNumByItemId(50001).ToString();

        base.SetReOpendAction(new Func <int, bool>(this.UpdatePlayerInfo));
    }
 private void OnShortTouchChip(GUIListChipParts.Data data)
 {
     if (this.viewModeType == CMD_ChipAdministration.ViewModeType.List)
     {
         CMD_QuestItemPOP.Create(data.masterChip);
     }
     else
     {
         if (data.userChip.userMonsterId > 0)
         {
             return;
         }
         if (this.saleUserChipList.Contains(data.userChip))
         {
             this.totalPrice -= data.masterChip.GetSellPrice();
             this.saleClusterMessageLabel.text = StringFormat.Cluster(this.totalPrice);
             if (this.saleUserChipList.Count >= 10)
             {
                 foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList in this.userChipList)
                 {
                     this.chipList.SetSelectColor(userChipList.userChipId, userChipList.userMonsterId > 0);
                 }
                 foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList2 in this.saleUserChipList)
                 {
                     this.chipList.SetSelectColor(userChipList2.userChipId, true);
                 }
             }
             this.saleUserChipList.Remove(data.userChip);
             this.chipList.SetSelectColor(data.userChip.userChipId, false);
             this.chipList.SetAllSelectMessage(string.Empty);
             for (int j = 0; j < this.saleUserChipList.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>(); j++)
             {
                 this.chipList.SetSelectMessage(this.saleUserChipList[j].userChipId, (j + 1).ToString());
             }
         }
         else if (this.saleUserChipList.Count < 10)
         {
             this.totalPrice += data.masterChip.GetSellPrice();
             this.saleClusterMessageLabel.text = StringFormat.Cluster(this.totalPrice);
             this.saleUserChipList.Add(data.userChip);
             this.chipList.SetSelectColor(data.userChip.userChipId, true);
             this.chipList.SetAllSelectMessage(string.Empty);
             for (int k = 0; k < this.saleUserChipList.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>(); k++)
             {
                 this.chipList.SetSelectMessage(this.saleUserChipList[k].userChipId, (k + 1).ToString());
             }
             if (this.saleUserChipList.Count >= 10)
             {
                 this.chipList.SetAllSelectColor(true);
             }
         }
         this.EnableSaleDecisionButton(this.saleUserChipList.Count > 0);
     }
 }
Example #11
0
    protected virtual void SetPossessionMoney(FacilityUpgradeM masterUpgrade)
    {
        string gamemoney = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney;

        this.possessionDetail.text = StringFormat.Cluster(gamemoney);
        if (masterUpgrade.upgradeAssetNum1.ToInt32() > gamemoney.ToInt32())
        {
            this.costDetail.color = Color.red;
        }
        this.costDetail.text = StringFormat.Cluster(masterUpgrade.upgradeAssetNum1);
    }
	public static string GetCostString(string categoryId, int costValue)
	{
		string result = "0";
		int num = 0;
		if (int.TryParse(categoryId, out num))
		{
			if (num == 4)
			{
				result = StringFormat.Cluster(costValue);
			}
			else
			{
				result = costValue.ToString();
			}
		}
		return result;
	}
 private void SkipResultInfo()
 {
     foreach (Coroutine routine in this.countUpRewards)
     {
         AppCoroutine.Stop(routine, false);
     }
     this.ResetLabelSizeAndColor(this.getExp);
     this.ResetLabelSizeAndColor(this.getCluster);
     this.ResetLabelSizeAndColor(this.getFriendPointForLeader);
     this.ResetLabelSizeAndColor(this.getFriendPoint);
     this.getExp.text     = this.totalExp.ToString();
     this.getCluster.text = StringFormat.Cluster(this.totalCluster);
     this.getFriendPointForLeader.text = this.totalFriendPointLeader.ToString();
     this.getFriendPoint.text          = this.totalFriendPoint.ToString();
     this.StopCountUpSound();
     this.ShowDigimonInfos();
 }
    private void OpenExchangedItemModalMessage(ExchangeItem exchangeItem)
    {
        MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory) int.Parse(exchangeItem.exchangeItemData.assetCategoryId);
        switch (assetCategory)
        {
        case MasterDataMng.AssetCategory.DIGI_STONE:
            DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point -= int.Parse(this.consumeNum);
            break;

        default:
            if (assetCategory == MasterDataMng.AssetCategory.MEAT)
            {
                int num = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.meatNum) - int.Parse(this.consumeNum);
                DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.meatNum = num.ToString();
            }
            break;

        case MasterDataMng.AssetCategory.TIP:
        {
            int num2 = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney) - int.Parse(this.consumeNum);
            DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney = num2.ToString();
            break;
        }

        case MasterDataMng.AssetCategory.ITEM:
        {
            GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(exchangeItem.exchangeItemData.assetValue);
            if (itemM != null && int.Parse(itemM.itemId) == 2)
            {
                Singleton <UserDataMng> .Instance.UpdateUserItemNum(2, -int.Parse(this.consumeNum));
            }
            break;
        }
        }
        int              num3 = int.Parse(exchangeItem.exchangeDetailNum, NumberStyles.AllowThousands);
        string           exchangeDetailName = exchangeItem.exchangeDetailName;
        string           arg              = StringFormat.Cluster(num3 * exchangeItem.numCounter);
        string           info             = string.Format(StringMaster.GetString("ExchangeSuccessInfo"), exchangeDetailName, arg);
        CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(new Action <int>(this.RunReExchangeInfoLogicAPI), "CMD_ModalMessage", null) as CMD_ModalMessage;

        cmd_ModalMessage.Title = StringMaster.GetString("ExchangeSuccessTitle");
        cmd_ModalMessage.Info  = info;
        GUIPlayerStatus.RefreshParams_S(true);
    }
Example #15
0
 public static string Cluster(string s)
 {
     return(StringFormat.Cluster(int.Parse(s)));
 }
    public void SetDetail(GameWebAPI.RespDataMS_EventExchangeInfoLogic.Result.Detail exchangeInfo, int selectItemNum, Action <ExchangeItem> touchEvent)
    {
        this.onPushedButton = touchEvent;
        GUICollider component = this.pushedButton.GetComponent <GUICollider>();

        component.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
        {
            this.onPushedButton(this);
        };
        this.selectNum = selectItemNum;
        int.TryParse(exchangeInfo.eventExchangeDetailId, out this.exchangeDetailId);
        this.exchangeItemData = exchangeInfo.item;
        string text  = string.Empty;
        string value = string.Empty;

        this.exchangeInfoData = exchangeInfo;
        this.viewIcon.gameObject.SetActive(true);
        this.viewIconTexture.gameObject.SetActive(false);
        GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM assetCategory = MasterDataMng.Instance().RespDataMA_AssetCategoryM.GetAssetCategory(exchangeInfo.assetCategoryId);
        string text2 = string.Empty;

        if (assetCategory != null)
        {
            text2 = assetCategory.assetTitle;
        }
        this.exchangeDetailCategoryID = exchangeInfo.assetCategoryId;
        MasterDataMng.AssetCategory assetCategory2 = (MasterDataMng.AssetCategory) int.Parse(exchangeInfo.assetCategoryId);
        this.numCountLabel.text = "1";
        switch (assetCategory2)
        {
        case MasterDataMng.AssetCategory.MONSTER:
        {
            text = string.Empty;
            if (this.micon != null)
            {
                UnityEngine.Object.Destroy(this.micon.gameObject);
            }
            this.viewIcon.gameObject.SetActive(false);
            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(exchangeInfo.assetValue);
            this.exchangeDetailName = monsterData.monsterMG.monsterName;
            this.micon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, new Vector3(1f, 1f, 1f), new Vector3(-165f, 25f, 0f), this.iconRoot.transform, true, false);
            UIWidget component2 = base.gameObject.GetComponent <UIWidget>();
            if (component2 != null)
            {
                DepthController component3 = this.micon.GetComponent <DepthController>();
                if (component3 != null)
                {
                    component3.AddWidgetDepth(this.micon.transform, component2.depth + 10);
                }
            }
            this.micon.GetDepthController();
            BoxCollider component4 = this.micon.gameObject.GetComponent <BoxCollider>();
            if (component4 != null)
            {
                component4.enabled = false;
            }
            break;
        }

        case MasterDataMng.AssetCategory.DIGI_STONE:
            text = "Common02_LB_Stone";
            this.exchangeDetailName = text2;
            break;

        case MasterDataMng.AssetCategory.LINK_POINT:
            text = "Common02_LB_Link";
            this.exchangeDetailName = text2;
            break;

        case MasterDataMng.AssetCategory.TIP:
            text = "Common02_LB_Chip";
            this.exchangeDetailName = text2;
            break;

        default:
            switch (assetCategory2)
            {
            case MasterDataMng.AssetCategory.MEAT:
                text = "Common02_item_meat";
                this.exchangeDetailName = text2;
                goto IL_567;

            case MasterDataMng.AssetCategory.SOUL:
            {
                this.exchangeDetailName = text2;
                GameWebAPI.RespDataMA_GetSoulM.SoulM soul = MasterDataMng.Instance().RespDataMA_SoulM.GetSoul(exchangeInfo.assetValue);
                value = soul.soulName;
                this.viewIconTexture.gameObject.SetActive(true);
                string evolveItemIconPathByID = ClassSingleton <EvolutionData> .Instance.GetEvolveItemIconPathByID(exchangeInfo.assetValue);

                NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, evolveItemIconPathByID, false);
                this.viewIcon.gameObject.SetActive(false);
                goto IL_567;
            }

            case MasterDataMng.AssetCategory.FACILITY_KEY:
            {
                this.viewIconTexture.gameObject.SetActive(true);
                this.viewIcon.gameObject.SetActive(false);
                FacilityConditionM[] facilityCondition         = FarmDataManager.GetFacilityCondition(exchangeInfo.assetValue);
                FacilityConditionM   facilityConditionM        = facilityCondition.FirstOrDefault((FacilityConditionM x) => int.Parse(x.conditionType) == 1);
                FacilityM            facilityMasterByReleaseId = FarmDataManager.GetFacilityMasterByReleaseId(facilityConditionM.releaseId);
                NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, facilityMasterByReleaseId.GetIconPath(), false);
                FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(exchangeInfo.assetValue);
                if (facilityKeyMaster != null)
                {
                    this.exchangeDetailName = facilityKeyMaster.facilityKeyName;
                }
                goto IL_567;
            }

            case MasterDataMng.AssetCategory.CHIP:
            {
                GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(exchangeInfo.assetValue);
                ChipDataMng.MakePrefabByChipData(chipMainData, this.viewIcon.gameObject, this.viewIcon.gameObject.transform.localPosition, this.viewIcon.gameObject.transform.localScale, null, 128, 128, false);
                this.exchangeDetailName = chipMainData.name;
                this.viewIcon.gameObject.SetActive(false);
                goto IL_567;
            }

            case MasterDataMng.AssetCategory.DUNGEON_TICKET:
            {
                this.viewIconTexture.gameObject.SetActive(true);
                this.viewIcon.gameObject.SetActive(false);
                GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => exchangeInfo.assetValue == x.dungeonTicketId);
                if (dungeonTicketM != null)
                {
                    global::Debug.Log(dungeonTicketM.img);
                    NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, dungeonTicketM.img, false);
                    this.exchangeDetailName = dungeonTicketM.name;
                }
                goto IL_567;
            }
            }
            text = string.Empty;
            this.exchangeDetailName = StringMaster.GetString("Present-10");
            break;

        case MasterDataMng.AssetCategory.ITEM:
        {
            GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(exchangeInfo.assetValue);
            if (itemM != null)
            {
                this.exchangeDetailName = itemM.name;
                this.viewIconTexture.gameObject.SetActive(true);
                this.viewIcon.gameObject.SetActive(false);
                string largeImagePath = itemM.GetLargeImagePath();
                NGUIUtil.ChangeUITextureFromFile(this.viewIconTexture, largeImagePath, false);
            }
            break;
        }
        }
IL_567:
        if (!string.IsNullOrEmpty(text) && assetCategory2 != MasterDataMng.AssetCategory.MONSTER)
        {
            this.viewIcon.spriteName = text;
        }
        if (assetCategory2 == MasterDataMng.AssetCategory.TIP)
        {
            this.exchangeDetailNum = StringFormat.Cluster(exchangeInfo.assetNum);
        }
        else
        {
            this.exchangeDetailNum = exchangeInfo.assetNum;
        }
        if (assetCategory2 != MasterDataMng.AssetCategory.MONSTER)
        {
            this.titleLabel.text = string.Format(StringMaster.GetString("SystemItemCount"), this.exchangeDetailName, this.exchangeDetailNum);
        }
        else
        {
            this.titleLabel.text = this.exchangeDetailName;
        }
        if (!string.IsNullOrEmpty(value))
        {
            this.exchangeDetailName = value;
        }
        this.exchangeConsumeNum = exchangeInfo.needNum;
        this.buildNumLabel.text = this.exchangeConsumeNum;
        this.ExchangeIconSet(exchangeInfo);
        this.ResetNum(exchangeInfo);
        this.SetButton(exchangeInfo);
        this.ShowGUI();
    }
 private void SkipDigimonInfos()
 {
     this.particleRemover.SetActive(true);
     if (this.showDigimonInfos != null)
     {
         AppCoroutine.Stop(this.showDigimonInfos, false);
         this.showDigimonInfos = null;
     }
     this.restRewardExp = this.totalExp;
     this.ResetLabelSizeAndColor(this.getExp);
     this.getCluster.text = StringFormat.Cluster(this.totalCluster);
     if (this.digimonInfos != null)
     {
         for (int i = 0; i < this.digimonInfos.Length; i++)
         {
             NGUITools.SetActiveSelf(this.digimonInfos[i].gameObject, true);
             if (!this.isMulti)
             {
                 string tgtId = this.deckData.monsterList[i].userMonsterId;
                 GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonsterList = this.memoryMonsterList.Single((GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList x) => x.userMonsterId == tgtId);
                 MonsterData monsterDataByUserMonsterID = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(tgtId, false);
                 this.digimonInfos[i].CreateDetails(userMonsterList.ex.ToInt32(), userMonsterList.level.ToInt32(), monsterDataByUserMonsterID.monsterM.maxLevel.ToInt32());
             }
             else
             {
                 GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo;
                 int partyIndex   = DataMng.Instance().GetPartyIndex(i);
                 int monsterIndex = DataMng.Instance().GetMonsterIndex(i);
                 GameWebAPI.RespData_WorldMultiStartInfo.Party party = respData_WorldMultiStartInfo.party[partyIndex];
                 GameWebAPI.Common_MonsterData common_MonsterData    = party.userMonsters[monsterIndex];
                 MonsterData monsterData = common_MonsterData.ToMonsterData();
                 string      tgtId       = common_MonsterData.userMonsterId;
                 GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonsterList2 = this.memoryMonsterList.SingleOrDefault((GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList x) => x.userMonsterId == tgtId);
                 if (userMonsterList2 != null)
                 {
                     this.digimonInfos[i].CreateDetails(userMonsterList2.ex.ToInt32(), userMonsterList2.level.ToInt32(), monsterData.monsterM.maxLevel.ToInt32());
                 }
                 else
                 {
                     this.digimonInfos[i].CreateDetails(monsterData);
                 }
             }
             GameObject gameObject = this.digimonInfos[i].gameObject;
             base.ResetTweenAlpha(gameObject);
         }
         BattleResultDigimonInfo[] growDigimonInfos = this.GetGrowDigimonInfos(this.digimonInfos);
         if (growDigimonInfos != null)
         {
             while (!this.UpdateDigimonExp(growDigimonInfos, true))
             {
             }
             for (int j = 0; j < growDigimonInfos.Length; j++)
             {
                 growDigimonInfos[j].FixExp(this.restRewardExp);
             }
         }
     }
     this.getExp.text = this.restRewardExp.ToString();
     this.StopCountUpSound();
     this.ShowTapNext();
 }
    public void SetItem(string assetCategoryId, string objectId, string num, bool isLoadASync = false, Action callback = null)
    {
        GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM assetCategory = MasterDataMng.Instance().RespDataMA_AssetCategoryM.GetAssetCategory(assetCategoryId);
        MasterDataMng.AssetCategory assetCategory2 = (MasterDataMng.AssetCategory)assetCategory.assetCategoryId.ToInt32();
        this.itemName = this.GetPresentName(assetCategory, objectId);
        string arg;

        if (assetCategory2 == MasterDataMng.AssetCategory.TIP)
        {
            arg = StringFormat.Cluster(num);
        }
        else
        {
            arg = num;
        }
        if (this.itemNameLabel != null)
        {
            if (assetCategory2 == MasterDataMng.AssetCategory.FACILITY_KEY)
            {
                this.itemNameLabel.text = this.itemName;
            }
            else
            {
                this.itemNameLabel.text = string.Format(StringMaster.GetString("SystemItemCount"), this.itemName, arg);
            }
        }
        switch (assetCategory2)
        {
        case MasterDataMng.AssetCategory.MONSTER:
            if (null != this.monsterIcon)
            {
                UnityEngine.Object.Destroy(this.monsterIcon.gameObject);
            }
            this.monsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(MonsterDataMng.Instance().CreateMonsterDataByMID(objectId), Vector3.one, Vector3.zero, this.iconSprite.transform, true, false);
            this.monsterIcon.ResizeIcon(this.iconSprite.width, this.iconSprite.height);
            if (null != this.monsterIcon)
            {
                DepthController depthController = this.monsterIcon.GetDepthController();
                if (null != depthController)
                {
                    depthController.AddWidgetDepth(this.monsterIcon.transform, this.iconSprite.depth + 10);
                }
            }
            if (callback != null)
            {
                callback();
            }
            break;

        case MasterDataMng.AssetCategory.DIGI_STONE:
        case MasterDataMng.AssetCategory.LINK_POINT:
        case MasterDataMng.AssetCategory.TIP:
        case MasterDataMng.AssetCategory.EXP:
        case MasterDataMng.AssetCategory.MEAT:
            this.iconSprite.enabled    = true;
            this.iconSprite.spriteName = this.GetSpriteName(assetCategory2);
            if (callback != null)
            {
                callback();
            }
            break;

        case MasterDataMng.AssetCategory.ITEM:
        case MasterDataMng.AssetCategory.SOUL:
        case MasterDataMng.AssetCategory.FACILITY_KEY:
        case MasterDataMng.AssetCategory.DUNGEON_TICKET:
            this.iconTexture.enabled = true;
            if (isLoadASync)
            {
                NGUIUtil.ChangeUITextureFromFileASync(this.iconTexture, this.GetTexturePath(assetCategory2, objectId), false, callback);
            }
            else
            {
                NGUIUtil.ChangeUITextureFromFile(this.iconTexture, this.GetTexturePath(assetCategory2, objectId), false);
                if (callback != null)
                {
                    callback();
                }
            }
            if (assetCategory2 == MasterDataMng.AssetCategory.FACILITY_KEY)
            {
                this.iconSprite.enabled    = true;
                this.iconSprite.spriteName = "Common02_item_flame";
            }
            break;

        case MasterDataMng.AssetCategory.CHIP:
        {
            GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(objectId);
            ChipDataMng.MakePrefabByChipData(chipMainData, this.iconSprite.gameObject, this.iconSprite.transform.localPosition, this.iconSprite.transform.localScale, delegate(ChipIcon result)
                {
                    if (callback != null)
                    {
                        callback();
                    }
                }, this.iconSprite.width, this.iconSprite.height, true);
            break;
        }
        }
        this.uiBasicSprites = base.transform.GetComponentsInParent <UIBasicSprite>(true);
    }
Example #19
0
 protected void UpdateClusterNum()
 {
     this.possessionTip.text = StringFormat.Cluster(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney);
 }
 private void UpdateCluster()
 {
     GameWebAPI.RespDataUS_GetPlayerInfo.PlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo;
     this.clusterLabel.text = StringFormat.Cluster(playerInfo.gamemoney);
 }
Example #21
0
 private bool UpdatePlayerInfo(int noop)
 {
     GameWebAPI.RespDataUS_GetPlayerInfo.PlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo;
     this.lbTX_Chip.text = StringFormat.Cluster(playerInfo.gamemoney);
     return(false);
 }
Example #22
0
 private void UpdateDigicoin()
 {
     this.cointCount.text = StringFormat.Cluster(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney);
 }
Example #23
0
 private void UpdateChipGet()
 {
     this.ngTX_CHIP_GET.text = StringFormat.Cluster(this.CalcChipGet());
 }
Example #24
0
 private void UpdateClusterNum()
 {
     GameWebAPI.RespDataUS_GetPlayerInfo.PlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo.playerInfo;
     this.ngTXT_CHIP.text = StringFormat.Cluster(playerInfo.gamemoney);
     GUIPlayerStatus.RefreshParams_S(false);
 }
Example #25
0
    public void SetDetail(GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission missionInfo, Action <MissionItem> touchEvent)
    {
        this.rewardTagLabel.text = StringMaster.GetString("Mission-09");
        this.arTagLabel.text     = StringMaster.GetString("Mission-05");
        int.TryParse(missionInfo.detail.missionId, out this.missionId);
        this.missionCategoryId = missionInfo.missionCategoryId;
        this.lastStepFlg       = missionInfo.lastStepFlg;
        int categoryId = int.Parse(this.missionCategoryId);

        this.onPushedButton = touchEvent;
        int missionType = -1;

        int.TryParse(missionInfo.displayGroup, out missionType);
        int status = missionInfo.status;

        this.SetButton(status, missionType, categoryId);
        int num = 0;

        foreach (GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission.Reward reward2 in missionInfo.reward)
        {
            if (reward2.viewFlg == "1")
            {
                num++;
            }
        }
        if (num > 1)
        {
            this.rewardDetaildButton.SetActive(true);
            this.hiddenRewardNum.text = string.Format(StringMaster.GetString("MissionRewardHiddenNum"), num - 1);
        }
        else
        {
            this.rewardDetaildButton.SetActive(false);
            this.hiddenRewardNum.text = null;
        }
        this.tblBtnLayout.Reposition();
        this.rightBlackPlate.SetActive(true);
        this.conditionTitle.text = missionInfo.detail.missionDetail;
        string text  = string.Empty;
        int    num2  = 0;
        string text2 = string.Empty;
        string text3 = string.Empty;

        GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission.Reward[] reward3 = missionInfo.reward;
        foreach (GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission.Reward reward4 in reward3)
        {
            if (reward4.viewFlg == "1")
            {
                int.TryParse(reward4.assetCategoryId, out num2);
                text  = DataMng.Instance().GetAssetTitle(reward4.assetCategoryId, reward4.assetValue);
                text2 = reward4.assetValue;
                text3 = reward4.assetNum;
                break;
            }
        }
        AppCoroutine.Start(this.csItem.SetItemWithWaitASync(num2.ToString(), text2, text3, false, delegate
        {
        }), false);
        if (num2 == 19)
        {
            GameWebAPI.RespDataMA_TitleMaster.TitleM titleM;
            TitleDataMng.GetDictionaryTitleM().TryGetValue(int.Parse(text2), out titleM);
            this.lbRewardDetail.text = ((titleM == null) ? StringMaster.GetString("AlertDataErrorTitle") : titleM.name);
            this.lbRewardDetail.gameObject.SetActive(true);
            this.GoOperatorMsg.SetActive(false);
            this.quantity.gameObject.SetActive(false);
        }
        else
        {
            this.quantity.text = ((!(this.rewardIcon.spriteName == "Common02_Icon_Chip")) ? text3 : StringFormat.Cluster(text3));
            this.lbRewardDetail.gameObject.SetActive(false);
            this.GoOperatorMsg.SetActive(true);
            this.quantity.gameObject.SetActive(true);
        }
        int    num3         = 0;
        string missionValue = missionInfo.detail.missionValue;

        int.TryParse(missionValue, out num3);
        int num4 = Mathf.Clamp(missionInfo.nowValue, 0, num3);

        if (status != 2)
        {
            if (num3 != 0)
            {
                this.achievementRate.text = string.Format(StringMaster.GetString("SystemFraction"), num4, missionValue);
            }
            else
            {
                this.achievementRate.text = StringMaster.GetString("SystemNoneHyphen");
            }
            this.achievementRate.spacingX = 0;
            this.achievementRate.color    = Label.NOT_COMPLETE_COLOR;
        }
        else
        {
            this.achievementRate.text     = StringMaster.GetString("Mission-06");
            this.achievementRate.spacingX = -1;
            this.achievementRate.color    = Label.COMPLETE_COLOR;
        }
    }
Example #26
0
 private void UpdateClusterNum()
 {
     this.myClusterLabel.text = StringFormat.Cluster(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney);
     GUIPlayerStatus.RefreshParams_S(false);
 }
Example #27
0
    public void SetDetail(FacilityM facilityMaster, FacilityConditionM[] facilityConditionMaster, bool[] isClearConditions, Action <FacilityShopItem> touchEvent)
    {
        this.facilityID        = int.Parse(facilityMaster.facilityId);
        this.onPushedBuyButton = touchEvent;
        FacilityM facilityMaster2 = FarmDataManager.GetFacilityMaster(this.facilityID);

        NGUIUtil.ChangeUITextureFromFile(this.facilityIcon, facilityMaster2.GetIconPath(), false);
        if (isClearConditions.Any((bool x) => !x))
        {
            this.DetailSetActive(false);
            this.lockDetail.SetActive(true);
            this.conditionTitle.text       = string.Format(StringMaster.GetString("FacilityShopConditionTitle"), facilityMaster.facilityName);
            this.buildCountTitle.text      = StringMaster.GetString("FacilityShopBuildNum");
            this.buildTimeTitle.text       = StringMaster.GetString("FarmEditStockTime");
            this.eventBuildCountTitle.text = StringMaster.GetString("FacilityShopBuildNum");
            this.eventBuildTimeTitle.text  = StringMaster.GetString("FarmEditStockTime");
            for (int i = 0; i < facilityConditionMaster.Length; i++)
            {
                if (!(null == this.conditionTexts[i]))
                {
                    FacilityConditionM facilityConditionM = facilityConditionMaster[i];
                    if (string.IsNullOrEmpty(facilityConditionM.description))
                    {
                        this.conditionTexts[i].text = StringMaster.GetString("FacilityShopConditionUnknow");
                    }
                    else
                    {
                        this.conditionTexts[i].text = facilityConditionM.description;
                    }
                    if (!isClearConditions[i])
                    {
                        this.conditionTexts[i].color = this.nonClearColor;
                    }
                }
            }
            for (int j = facilityConditionMaster.Length; j < this.conditionTexts.Length; j++)
            {
                if (!(null == this.conditionTexts[j]))
                {
                    this.conditionTexts[j].gameObject.SetActive(false);
                }
            }
            if (facilityConditionMaster.Length == 1 && null != this.conditionLine)
            {
                this.conditionLine.SetActive(false);
            }
            if (0 < facilityConditionMaster.Length && facilityConditionMaster[0].conditionType == 5.ToString())
            {
                this.ChangeEventItemMode();
            }
        }
        else
        {
            this.DetailSetActive(true);
            this.lockDetail.SetActive(false);
            UILabel uilabel = this.facilityName;
            string  text    = facilityMaster.facilityName;
            this.eventFacilityName.text = text;
            uilabel.text = text;
            int nowCount = this.GetNowCount();
            int num      = int.Parse(facilityMaster.maxNum);
            if (nowCount != -1)
            {
                UILabel uilabel2 = this.buildCount;
                text = string.Format(StringMaster.GetString("SystemFraction"), nowCount, facilityMaster.maxNum);
                this.eventBuildCount.text = text;
                uilabel2.text             = text;
            }
            this.buildTime.text = facilityMaster.buildingTime.ToBuildTime();
            if (int.Parse(facilityMaster.buildingAssetCategoryId1) == 4)
            {
                this.buyTypeTip.gameObject.SetActive(true);
                this.price.text = StringFormat.Cluster(facilityMaster.buildingAssetNum1);
            }
            else
            {
                this.buyTypeStone.gameObject.SetActive(true);
                this.price.text = facilityMaster.buildingAssetNum1;
            }
            if (FarmUtility.IsShortage(facilityMaster.buildingAssetCategoryId1, facilityMaster.buildingAssetNum1))
            {
                this.SetButtonGrayout();
            }
            if (nowCount >= num)
            {
                this.SetButtonLimit();
            }
            if (0 < facilityConditionMaster.Length && facilityConditionMaster[0].conditionType == 5.ToString())
            {
                this.BuildEventItemMode();
            }
        }
    }