Пример #1
0
 private void SetThumbnailMonster(UITexture iconTexture, MonsterData iconMonsterData, bool isLoadASync)
 {
     if (string.IsNullOrEmpty(iconMonsterData.monsterM.iconId))
     {
         iconTexture.transform.gameObject.SetActive(false);
     }
     else
     {
         string assetBundlePath = string.Empty;
         string resourcePath    = string.Empty;
         iconTexture.transform.gameObject.SetActive(true);
         if (!iconMonsterData.userMonster.IsEgg())
         {
             assetBundlePath = GUIMonsterIcon.GetMonsterIconPathByIconId(iconMonsterData.monsterM.iconId);
             resourcePath    = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(iconMonsterData.monsterM.iconId);
         }
         else
         {
             int    num    = MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM.Length;
             string iconId = string.Empty;
             for (int i = 0; i < num; i++)
             {
                 GameWebAPI.RespDataMA_GetMonsterEvolutionRouteM.MonsterEvolutionRouteM monsterEvolutionRouteM = MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM[i];
                 if (monsterEvolutionRouteM.monsterEvolutionRouteId == iconMonsterData.userMonster.monsterEvolutionRouteId)
                 {
                     iconId = monsterEvolutionRouteM.eggMonsterId;
                     break;
                 }
             }
             assetBundlePath = GUIMonsterIcon.GetMonsterIconPathByIconId(iconId);
             resourcePath    = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(iconId);
         }
         GUIMonsterIcon.SetTextureMonsterParts(iconTexture, resourcePath, assetBundlePath, isLoadASync);
     }
 }
    protected override IEnumerator MainRoutine()
    {
        BattleObjectPooler.CallInitialize();
        BattleObjectPooler.isCheckEnable = false;
        TextureTimeScrollRealTime.TimeReset();
        this.SetLoadingImage(true);
        this.SetActiveHierarcyRendering(false);
        base.stateManager.initialize.InitializeRoots();
        base.battleStateData.beforeConfirmDigiStoneNumber = base.hierarchyData.digiStoneNumber;
        List <IEnumerator> functionList = new List <IEnumerator>();

        functionList.Add(this.LoadBeforeInitializeUI());
        functionList.Add(this.InitSound());
        functionList.Add(this.CheckRecover());
        functionList.Add(this.LoadResources());
        functionList.Add(this.LoadPlayer());
        functionList.Add(this.LoadEnemy());
        functionList.Add(this.LoadCharacterAfter());
        functionList.Add(this.LoadCommonEffect());
        functionList.Add(this.LoadSkill());
        functionList.Add(this.LoadAfterInitializeUI());
        Action loading = base.stateManager.battleUiComponents.initializeUi.GetLoadingInvoke(functionList.Count);

        TimeProfiler.BeginTotalProfile();
        foreach (IEnumerator function in functionList)
        {
            TimeProfiler.BeginProfile();
            while (function.MoveNext())
            {
                yield return(null);
            }
            loading();
            yield return(new WaitForEndOfFrame());

            TimeProfiler.EndProfile();
            DkLog.W(string.Format("経過時間 : {0} | {1}", TimeProfiler.ElapseTime, function), false);
        }
        TimeProfiler.EndTotalProfile();
        DkLog.W(string.Format("経過時間(total) : {0}", TimeProfiler.TotalElapseTime), false);
        for (int i = 0; i < base.hierarchyData.usePlayerCharacters.Length; i++)
        {
            bool isLeade = i == base.hierarchyData.leaderCharacter;
            CharacterStateControl characterStateControl = base.battleStateData.playerCharacters[i];
            string resourcePath            = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(characterStateControl.playerStatus.thumbnailId);
            string monsterIconPathByIconId = GUIMonsterIcon.GetMonsterIconPathByIconId(characterStateControl.playerStatus.thumbnailId);
            base.stateManager.uiControl.ApplyMonsterButtonIcon(i, characterStateControl, isLeade, resourcePath, monsterIconPathByIconId);
        }
        BattleDebug.Log("--- バトルGC : 開始");
        Resources.UnloadUnusedAssets();
        GC.Collect();
        BattleDebug.Log("--- バトルGC : 完了");
        this.SetActiveHierarcyRendering(true);
        this.SetLoadingImage(false);
        base.stateManager.uiControl.SetTouchEnable(true);
        base.stateManager.SetBattleScreen(BattleScreen.BattleStartAction);
        base.stateManager.battleUiComponents.InitSafeArea();
        yield break;
    }
Пример #3
0
    public void SetImage(string iconId, string growStep)
    {
        string resourcePath            = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(iconId);
        string monsterIconPathByIconId = GUIMonsterIcon.GetMonsterIconPathByIconId(iconId);

        this.monsterImage.enabled = false;
        GUIMonsterIcon.SetTextureMonsterParts(this.monsterImage, resourcePath, monsterIconPathByIconId, true);
        this.monsterImage.enabled = true;
        UISprite component = base.gameObject.GetComponent <UISprite>();
        int      growStep2 = (int)MonsterGrowStepData.ToGrowStep(growStep);

        GUIMonsterIcon.SetThumbnailFrame(component, this.frameImage, growStep2);
    }
Пример #4
0
    public void SetMonsterIcon(string iconId, string arousal, string growStep)
    {
        base.ShowGUI();
        this.txCHAR.transform.gameObject.SetActive(true);
        string monsterIconPathByIconId = GUIMonsterIcon.GetMonsterIconPathByIconId(iconId);
        string resourcePath            = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(iconId);

        GUIMonsterIcon.SetTextureMonsterParts(this.txCHAR, resourcePath, monsterIconPathByIconId, this.ReadTexByASync);
        GUIMonsterIcon.DispArousal(arousal, this.goArousal, this.spArousal);
        int growStep2 = int.Parse(growStep);

        GUIMonsterIcon.SetThumbnailFrame(this.spBASE, this.spFRAME, growStep2);
        if (!this._gimmick && this.goGimmick != null)
        {
            this.goGimmick.SetActive(false);
        }
    }
Пример #5
0
 public static void MakeAllMonsterTex(CMD_Picturebook cmd, int allMonsterCount)
 {
     for (int i = 0; i < allMonsterCount; i++)
     {
         PicturebookMonster monsterData = cmd.GetMonsterData(i);
         if (monsterData == null)
         {
             break;
         }
         string iconId = monsterData.monsterMaster.Simple.iconId;
         string monsterIconPathByIconId          = GUIMonsterIcon.GetMonsterIconPathByIconId(iconId);
         string resourcePath                     = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(iconId);
         PicturebookItem.TextureData textureData = new PicturebookItem.TextureData();
         textureData._monsterTexture      = new Texture2D(PicturebookItem.ICON_TEXTURE_CX, PicturebookItem.ICON_TEXTURE_CY);
         textureData._monsterAlphaTexture = new Texture2D(PicturebookItem.ICON_TEXTURE_CX, PicturebookItem.ICON_TEXTURE_CY);
         PicturebookMonsterIcon.SetTextureMonsterParts(ref textureData, resourcePath, monsterIconPathByIconId);
         PicturebookItem._monsterTextureDataList.Add(textureData);
     }
 }