Esempio n. 1
0
    private void SetCacheChipIconResources()
    {
        string selectDeckNum = DataMng.Instance().RespDataMN_DeckList.selectDeckNum;

        GameWebAPI.RespDataMN_GetDeckList.DeckList   deckList  = null;
        GameWebAPI.RespDataMN_GetDeckList.DeckList[] deckList2 = DataMng.Instance().RespDataMN_DeckList.deckList;
        for (int i = 0; i < deckList2.Length; i++)
        {
            if (selectDeckNum == deckList2[i].deckNum)
            {
                deckList = deckList2[i];
                break;
            }
        }
        int[] array = null;
        for (int j = 0; j < deckList.monsterList.Length; j++)
        {
            MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(deckList.monsterList[j].userMonsterId);

            MonsterChipEquipData chipEquip = userMonster.GetChipEquip();
            array = chipEquip.GetChipIdList();
        }
        for (int k = 0; k < array.Length; k++)
        {
            GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(array[k]);
            string iconPath = chipMainData.GetIconPath();
            if (!AssetDataMng.Instance().IsAssetBundleData(iconPath))
            {
                UnityEngine.Object resource = AssetDataMng.Instance().LoadObject(iconPath, null, true);
                AssetDataCacheMng.Instance().AddCache(iconPath, AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY, resource);
            }
        }
    }
Esempio n. 2
0
 public static GameWebAPI.RespDataMA_ChipM.Chip SetChipIconPath(GameWebAPI.RespDataMA_ChipM.Chip chip)
 {
     if (string.IsNullOrEmpty(chip.GetIconPath()))
     {
         chip.SetIconPath(string.Format("ChipThumbnail/{0}", chip.icon));
     }
     return(chip);
 }
Esempio n. 3
0
 public void SetupOnlyDetailParams(int userChipId, GameWebAPI.RespDataMA_ChipM.Chip chipData)
 {
     this.myParameter.menuType     = CMD_ChipSphere.MenuType.Detail;
     this.myParameter.chipName     = chipData.name;
     this.myParameter.chipDetail   = chipData.detail;
     this.myParameter.chipRank     = chipData.rank;
     this.myParameter.chipIconPath = chipData.GetIconPath();
     this.myParameter.userChipId   = userChipId;
 }
    public static CMD_InstallingPOP Create(GameWebAPI.ReqDataCS_ChipEquipLogic equip, GameWebAPI.RespDataMA_ChipM.Chip chip, Action successCallback)
    {
        CMD_InstallingPOP cmd_InstallingPOP = GUIMain.ShowCommonDialog(null, "CMD_InstallingPOP", null) as CMD_InstallingPOP;

        cmd_InstallingPOP.equip      = equip;
        cmd_InstallingPOP.chipName   = chip.name;
        cmd_InstallingPOP.chipDetail = chip.detail;
        cmd_InstallingPOP.SetTexture(chip.GetIconPath());
        cmd_InstallingPOP.SetRankSprite(chip.rank);
        cmd_InstallingPOP.successCallback = successCallback;
        return(cmd_InstallingPOP);
    }
Esempio n. 5
0
 public void SetupDetail(int userChipId, GameWebAPI.RespDataMA_ChipM.Chip chipData)
 {
     this.isOpened = true;
     this.SetupOnlyDetailParams(userChipId, chipData);
     this.frameSprite.spriteName = "Chip_Sphere_Thumbnail_ON";
     NGUITools.SetActiveSelf(this.chargesGO, false);
     NGUITools.SetActiveSelf(this.lookGO, false);
     NGUITools.SetActiveSelf(this.chipNameLabel.gameObject, true);
     NGUITools.SetActiveSelf(this.chipDescriptLabel.gameObject, true);
     this.chipNameLabel.text     = this.myParameter.chipName;
     this.chipDescriptLabel.text = this.myParameter.chipDetail;
     NGUIUtil.ChangeUITextureFromFileASync(this.chipTexture, chipData.GetIconPath(), false, null);
     NGUITools.SetActiveSelf(this.rankSprite.gameObject, true);
     this.rankSprite.spriteName = ChipTools.GetRankPath(chipData.rank);
 }
Esempio n. 6
0
    private void LoadIcon(GameWebAPI.RespDataMA_ChipM.Chip data = null, int texSizeWidth = -1, int texSizeHeight = -1)
    {
        this.isLoad = true;
        string texname = (data == null) ? "ChipThumbnail/Chip_Empty" : data.GetIconPath();

        NGUIUtil.LoadTextureAsync(this.iconTexture, texname, delegate
        {
            this.isLoad = false;
            if (this != null && texSizeWidth > 0 && texSizeHeight > 0)
            {
                float x = (float)texSizeWidth / (float)this.defaultTexSizeWidth;
                float y = (float)texSizeHeight / (float)this.defaultTexSizeHeight;
                this.transform.localScale = new Vector3(x, y, 1f);
            }
        });
    }
Esempio n. 7
0
 private void SetupIcon(GameWebAPI.RespDataMA_ChipM.Chip chipMainData)
 {
     NGUITools.SetActiveSelf(this.thumbnailTexture.gameObject, true);
     NGUIUtil.ChangeUITextureFromFileASync(this.thumbnailTexture, chipMainData.GetIconPath(), false, null);
     if (this.rareSprite != null)
     {
         this.rareSprite.spriteName = ChipTools.GetRankPath(chipMainData.rank);
         NGUITools.SetActiveSelf(this.rareSprite.gameObject, true);
     }
     if (this.noChipLabel != null)
     {
         NGUITools.SetActiveSelf(this.noChipLabel.gameObject, false);
     }
     if (this.chipNameLabel != null)
     {
         NGUITools.SetActiveSelf(this.chipNameLabel.gameObject, true);
         this.chipNameLabel.text = chipMainData.name;
     }
 }