private void UpdateMonsterIcon()
 {
     if (!this.isUpdate)
     {
         if (this.RespDataChatMessageDataResult.type != 3)
         {
             this.ngTX_USERNAME.text = this.RespDataChatMessageDataResult.userInfo.nickname;
             TitleDataMng.SetTitleIcon(this.RespDataChatMessageDataResult.userInfo.titleId, this.ngTITLE_ICON.GetComponent <UITexture>());
             this.thumbMid = this.RespDataChatMessageDataResult.userInfo.monsterId;
             MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.thumbMid);
             if (monsterData != null)
             {
                 GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.ngMONSTER_ICON.transform.localScale, this.ngMONSTER_ICON.transform.localPosition, this.ngMONSTER_ICON.transform.parent, true, true);
                 guimonsterIcon.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
                 {
                     this.OnThumbnailClicked();
                 };
                 DepthController depthController = guimonsterIcon.GetDepthController();
                 depthController.AddWidgetDepth(guimonsterIcon.transform, 1200);
             }
         }
         if (this.RespDataChatMessageDataResult.type == 4 && DataMng.Instance().UserId != this.RespDataChatMessageDataResult.userId)
         {
             this.ngMULTICODE_BCOL.size = new Vector3(this.ngMULTICODE_BCOL.size.x, this.ngMULTICODE_BCOL.size.y, 5f);
         }
         this.isUpdate = true;
     }
 }
    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();
    }
Beispiel #3
0
    private void SetInitLabel()
    {
        this.lbUserName.text = this.data.ownerName;
        this.lbComment.text  = this.data.introduction;
        TitleDataMng.SetTitleIcon(this.data.titleId, this.goTitleIcon.GetComponent <UITexture>());
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[] worldStageM  = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM   worldStageM2 = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == this.data.worldStageId);
        this.lbQuestName.text = worldStageM2.name + "\n" + this.data.dungeonName;
        string moodType = this.data.moodType;

        if (moodType != null)
        {
            if (moodType == "1")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-06");
                goto IL_125;
            }
            if (moodType == "2")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-07");
                goto IL_125;
            }
            if (!(moodType == "3"))
            {
            }
        }
        this.lbMoodType.text = StringMaster.GetString("RecruitRule-08");
IL_125:
        this.lbNowMemberNum.text = string.Format(StringMaster.GetString("SystemFraction"), this.data.memberCount, 3);
        if (!this.isOpenedQuest)
        {
            this.bgFrame.color     = ConstValue.DEFAULT_COLOR;
            this.lbUserName.color  = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbQuestName.color = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbComment.color   = ConstValue.DEACTIVE_BUTTON_LABEL;
        }
        if (this.data.ownerMonsterId != null)
        {
            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.ownerMonsterId);
            if (monsterData != null)
            {
                GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false);
                UIWidget       component      = base.gameObject.GetComponent <UIWidget>();
                if (component != null)
                {
                    DepthController depthController = guimonsterIcon.GetDepthController();
                    depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2);
                }
            }
        }
    }
Beispiel #4
0
    private void SetInitLabel()
    {
        this.lbUserName.text    = this.friendData.userData.nickname;
        this.lbUserComment.text = this.friendData.userData.description;
        this.lbLastLogin.text   = this.friendData.userData.loginTime;
        TitleDataMng.SetTitleIcon(this.friendData.userData.titleId, this.goTitleIcon.GetComponent <UITexture>());
        MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.friendData.monsterData.monsterId);

        if (monsterData != null)
        {
            GUIMonsterIcon  guimonsterIcon  = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMonsterIcon.transform.localScale, this.goMonsterIcon.transform.localPosition, this.goMonsterIcon.transform.parent, true, false);
            DepthController depthController = guimonsterIcon.GetDepthController();
            depthController.AddWidgetDepth(guimonsterIcon.transform, 1800);
        }
    }
Beispiel #5
0
 private void SetInitLabel()
 {
     this.lbUserName.text = this.data.userInfo.nickname;
     this.lbComment.text  = string.Format(StringMaster.GetString("ColosseumMockInvitation"), this.data.userInfo.nickname);
     TitleDataMng.SetTitleIcon(this.data.userInfo.titleId, this.goTitleIcon.GetComponent <UITexture>());
     if (this.data.userInfo.monsterId != null)
     {
         MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.userInfo.monsterId);
         if (monsterData != null)
         {
             GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false);
             UIWidget       component      = base.gameObject.GetComponent <UIWidget>();
             if (component != null)
             {
                 DepthController depthController = guimonsterIcon.GetDepthController();
                 depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2);
             }
         }
     }
 }
 private void UpdateMonsterIcon()
 {
     if (!this.isUpdate)
     {
         MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.thumbMid);
         if (monsterData != null)
         {
             GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.ngMONSTER_ICON.transform.localScale, this.ngMONSTER_ICON.transform.localPosition, this.ngMONSTER_ICON.transform.parent, true, true);
             int            add            = 1600;
             UISprite       component      = this.ngMONSTER_ICON.GetComponent <UISprite>();
             if (component != null)
             {
                 add = component.depth;
             }
             DepthController depthController = guimonsterIcon.GetDepthController();
             depthController.AddWidgetDepth(guimonsterIcon.transform, add);
         }
         global::Debug.Log("==================================================================== GUIListChatMemberParts MID = " + this.thumbMid);
         this.isUpdate = true;
     }
 }
    public string DialogDataSet(GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM masterUpgradeCategory, MasterDataMng.AssetCategory assetCategoryId, GameWebAPI.RespDataGA_ExecGacha.GachaRewardsData RewardsData)
    {
        string text = string.Empty;

        if (masterUpgradeCategory != null)
        {
            text = masterUpgradeCategory.assetTitle;
        }
        string arg = string.Empty;

        this.iconTexture.gameObject.SetActive(false);
        this.iconSprite.gameObject.SetActive(false);
        this.textMore.gameObject.SetActive(false);
        switch (assetCategoryId)
        {
        case MasterDataMng.AssetCategory.MONSTER:
        {
            MonsterData    monsterData    = MonsterDataMng.Instance().CreateMonsterDataByMID(RewardsData.assetValue);
            GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(MonsterDataMng.Instance().CreateMonsterDataByMID(RewardsData.assetValue), Vector3.one, Vector3.zero, this.iconSprite.transform, true, false);
            guimonsterIcon.ResizeIcon(this.iconSprite.width, this.iconSprite.height);
            if (null != guimonsterIcon)
            {
                DepthController depthController = guimonsterIcon.GetDepthController();
                if (null != depthController)
                {
                    depthController.AddWidgetDepth(guimonsterIcon.transform, this.iconSprite.depth + 10);
                    this.iconSprite.gameObject.SetActive(true);
                }
            }
            arg = monsterData.monsterMG.monsterName;
            break;
        }

        case MasterDataMng.AssetCategory.DIGI_STONE:
            arg = text;
            this.iconSprite.gameObject.SetActive(true);
            this.iconSprite.spriteName = this.GetSpriteName(assetCategoryId);
            break;

        case MasterDataMng.AssetCategory.LINK_POINT:
            arg = text;
            this.iconSprite.gameObject.SetActive(true);
            this.iconSprite.spriteName = this.GetSpriteName(assetCategoryId);
            break;

        case MasterDataMng.AssetCategory.TIP:
            this.iconSprite.gameObject.SetActive(true);
            this.iconSprite.spriteName = this.GetSpriteName(assetCategoryId);
            arg = text;
            break;

        default:
            switch (assetCategoryId)
            {
            case MasterDataMng.AssetCategory.MEAT:
                this.iconSprite.gameObject.SetActive(true);
                this.iconSprite.spriteName = this.GetSpriteName(assetCategoryId);
                arg = text;
                goto IL_2FA;

            case MasterDataMng.AssetCategory.SOUL:
            {
                GameWebAPI.RespDataMA_GetSoulM.SoulM soul = MasterDataMng.Instance().RespDataMA_SoulM.GetSoul(RewardsData.assetValue);
                arg = soul.soulName;
                NGUIUtil.ChangeUITextureFromFile(this.iconTexture, this.GetTexturePath(assetCategoryId, RewardsData.assetValue), false);
                this.iconTexture.gameObject.SetActive(true);
                goto IL_2FA;
            }

            case MasterDataMng.AssetCategory.FACILITY_KEY:
                arg = text;
                goto IL_2FA;

            case MasterDataMng.AssetCategory.CHIP:
            {
                GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(RewardsData.assetValue);
                ChipDataMng.MakePrefabByChipData(chipMainData, this.iconSprite.gameObject, this.iconSprite.transform.localPosition, this.iconSprite.transform.localScale, null, -1, -1, true);
                arg = chipMainData.name;
                goto IL_2FA;
            }
            }
            arg = StringMaster.GetString("Present-10");
            break;

        case MasterDataMng.AssetCategory.ITEM:
        {
            GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(RewardsData.assetValue);
            if (itemM != null)
            {
                arg = itemM.name;
                NGUIUtil.ChangeUITextureFromFile(this.iconTexture, this.GetTexturePath(assetCategoryId, RewardsData.assetValue), false);
                this.iconTexture.gameObject.SetActive(true);
            }
            break;
        }
        }
IL_2FA:
        return(string.Format(StringMaster.GetString("CaptureBonusItem"), arg, RewardsData.count));
    }