Esempio n. 1
0
    protected void StartCacheParty()
    {
        AssetDataCacheMng.Instance().DeleteCacheType(AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY);
        List <string> deckMonsterPathList = ClassSingleton <MonsterUserDataMng> .Instance.GetDeckMonsterPathList(true);

        AssetDataCacheMng.Instance().RegisterCacheType(deckMonsterPathList, AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY, false);
    }
Esempio n. 2
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. 3
0
    private IEnumerator ShowAll(Action <int> closeEvent, float sizeX, float sizeY, float showAnimationTime)
    {
        this.battleInfo.SetView(CMD_PartyEdit.ModeType);
        while (!AssetDataCacheMng.Instance().IsCacheAllReadyType(AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY))
        {
            yield return(null);
        }
        base.PartsTitle.SetTitle(StringMaster.GetString("PartyTitleEdit"));
        base.SetTutorialAnyTime("anytime_second_tutorial_partyedit");
        this.battleInfo.SetBossMonsterIcon(ClassSingleton <QuestData> .Instance.GetBossMonsterList(ClassSingleton <PartyBossIconsAccessor> .Instance.StageEnemies));
        this.battleInfo.SetSortieLimit();
        QuestBonusPack questBonus = new QuestBonusPack();

        questBonus.CreateQuestBonus(this.worldAreaId, this.worldStageId, this.worldDungeonId);
        QuestBonusTargetCheck bonusChecker = new QuestBonusTargetCheck();

        this.partyMember.SetView(this, questBonus, bonusChecker);
        this.partyInfo.SetView(CMD_PartyEdit.ModeType);
        this.partyMember.SetChangeMonsterEvent(new Action(this.UpdateSelectDeckData));
        this.RefreshPartyNumText();
        Vector3 v3 = base.gameObject.transform.localPosition;

        v3.x = 0f;
        base.gameObject.transform.localPosition = v3;
        base.Show(closeEvent, sizeX, sizeY, showAnimationTime);
        if (Loading.IsShow())
        {
            RestrictionInput.EndLoad();
        }
        yield break;
    }
Esempio n. 4
0
    private UnityEngine.Object _GetFromCache(string path)
    {
        bool flag = AssetDataCacheMng.Instance().IsCacheExist(path);

        if (flag)
        {
            return(AssetDataCacheMng.Instance().GetCache(path));
        }
        return(null);
    }
 private IEnumerator WaitSHow()
 {
     while (!AssetDataCacheMng.Instance().IsCacheAllReadyType(AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY))
     {
         yield return(null);
     }
     RestrictionInput.EndLoad();
     this.ClosePanel(true);
     yield break;
 }
Esempio n. 6
0
 protected void StartCacheBattle()
 {
     if (!GUIScreenHome.isCacheBattled)
     {
         AssetDataCacheMng.Instance().DeleteCacheType(AssetDataCacheMng.CACHE_TYPE.BATTLE_COMMON);
         List <string> battleCommon = AssetDataCacheData.GetBattleCommon();
         AssetDataCacheMng.Instance().RegisterCacheType(battleCommon, AssetDataCacheMng.CACHE_TYPE.BATTLE_COMMON, false);
         GUIScreenHome.isCacheBattled = true;
     }
 }
    private IEnumerator EndDungeonStartWait()
    {
        while (!AssetDataCacheMng.Instance().IsCacheAllReadyType(AssetDataCacheMng.CACHE_TYPE.BATTLE_COMMON))
        {
            yield return(null);
        }
        RestrictionInput.EndLoad();
        Singleton <UserDataMng> .Instance.ConsumeUserStamina(this.needLife);

        this.isGoingBattle = true;
        DataMng.Instance().WD_ReqDngResult.dungeonId = this.StageDataBk.worldDungeonM.worldDungeonId;
        DataMng.Instance().WD_ReqDngResult.clear = 0;
        base.SetLastCallBack(new Action(this.GoToBattleScene));
        this.ClosePanel(true);
        yield break;
    }
Esempio n. 8
0
 private IEnumerator GoBattle()
 {
     GameWebAPI.WD_Req_DngStart sendData = DataMng.Instance().GetResultUtilData().last_dng_req;
     if (!ClassSingleton <QuestData> .Instance.ExistEvent(sendData.dungeonId))
     {
         RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
         while (!AssetDataCacheMng.Instance().IsCacheAllReadyType(AssetDataCacheMng.CACHE_TYPE.BATTLE_COMMON))
         {
             yield return(null);
         }
         this.SetCacheChipIconResources();
         RestrictionInput.EndLoad();
         BattleStateManager.StartSingle(0.5f, 0.5f, true, null);
     }
     else
     {
         QuestStart.StartEventStage(DataMng.Instance().GetResultUtilData().last_dng_req);
     }
     yield break;
 }
    protected override IEnumerator CreateHomeData()
    {
        GUIPlayerStatus.RefreshParams_S(false);
        ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(MonsterDataMng.Instance().GetMonsterDataList());

        yield return(base.StartCoroutine(base.CreateFarm()));

        FarmRoot farm = FarmRoot.Instance;

        if (null != farm)
        {
            InputControll input = farm.Input;
            input.EnableControl = false;
        }
        base.StartCacheBattle();
        base.StartCacheParty();
        while (!AssetDataCacheMng.Instance().IsCacheAllReady())
        {
            yield return(null);
        }
        yield break;
    }
Esempio n. 10
0
 private void OnTouchDecide()
 {
     for (int i = 0; i < this.ppmiList.Count; i++)
     {
         if (this.ppmiList[i].Data == this.DataChg)
         {
             MonsterData data = this.PPMI_Instance.Data;
             this.PPMI_Instance.Data = this.ppmiList[i].Data;
             this.ppmiList[i].Data   = data;
             this.ClosePanel(true);
             return;
         }
     }
     this.PPMI_Instance.Data = this.DataChg;
     if (null != CMD_PartyEdit.instance)
     {
         List <string> pathL = CMD_PartyEdit.instance.MakeAllCharaPath();
         AssetDataCacheMng.Instance().RegisterCacheType(pathL, AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY, false);
     }
     RestrictionInput.StartLoad(RestrictionInput.LoadType.SMALL_IMAGE_MASK_ON);
     base.StartCoroutine(this.WaitSHow());
 }
Esempio n. 11
0
    private void StartFarm()
    {
        ServerDateTime.isUpdateServerDateTime = true;
        FarmRoot instance = FarmRoot.Instance;

        instance.DigimonManager.AppaearanceDigimon(null);
        this.EnableFarmInput();
        List <string> deckMonsterPathList = ClassSingleton <MonsterUserDataMng> .Instance.GetDeckMonsterPathList(false);

        AssetDataCacheMng.Instance().RegisterCacheType(deckMonsterPathList, AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY, false);
        if (ConstValue.IS_CHAT_OPEN == 1)
        {
            ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification.StartGetHistoryIdList();
        }
        GUIMain.BarrierOFF();
        this.ShowWebWindow();
        if (GUIScreenHome.homeOpenCallback != null)
        {
            GUIScreenHome.homeOpenCallback();
            GUIScreenHome.homeOpenCallback = null;
        }
    }
Esempio n. 12
0
 public UnityEngine.Object LoadObject(string path, Action <UnityEngine.Object> actEnd = null, bool showAlert = true)
 {
     if (actEnd == null && AssetDataCacheMng.Instance() != null)
     {
         bool flag = AssetDataCacheMng.Instance().IsCacheExist(path);
         if (flag)
         {
             return(AssetDataCacheMng.Instance().GetCache(path));
         }
     }
     UnityEngine.Object @object;
     if (this.USE_ASSET_BUNDLE == ABPrefabType.None)
     {
         @object = Resources.Load(path);
     }
     else
     {
         if (this.USE_RESOURCE_DATA_FOR_AB)
         {
             @object = Resources.Load(path);
         }
         else if (this.IsAssetBundleData(path))
         {
             @object = null;
         }
         else
         {
             @object = Resources.Load(path);
         }
         if (@object == null)
         {
             string resourceName = string.Empty;
             for (int i = 0; i < this.abidList.Count; i++)
             {
                 if (path.Length > this.abidList[i].abPath.Length && path.StartsWith(this.abidList[i].abPath))
                 {
                     resourceName = path.Substring(this.abidList[i].abPath.Length);
                     if (actEnd != null)
                     {
                         if (AssetBundleMng.Instance().LoadObjectASync(this.abidList[i], resourceName, actEnd))
                         {
                             return(null);
                         }
                     }
                     else
                     {
                         @object = AssetBundleMng.Instance().LoadObject(this.abidList[i], resourceName);
                         if (!(@object == null))
                         {
                             break;
                         }
                     }
                 }
             }
             global::Debug.Assert(null != @object, "AssetDataMng:LoadObject = " + path + "がない");
         }
     }
     if (@object == null && showAlert)
     {
         string messageString = string.Empty;
         if (File.Exists(path))
         {
             messageString = StringMaster.GetString("AlertFileErrorMemory");
         }
         else
         {
             messageString = StringMaster.GetString("AlertFileErrorNotFound");
         }
         NativeMessageDialog.Show(messageString);
     }
     if (actEnd != null)
     {
         actEnd(@object);
     }
     return(@object);
 }
Esempio n. 13
0
    protected virtual IEnumerator StartEvent()
    {
        yield return(base.StartCoroutine(this.CreateHomeData()));

        RestrictionInput.DeleteDisplayObject();
        TipsLoading.Instance.StopTipsLoad(true);
        Loading.Invisible();
        if (!GUIScreenHome.isManualScreenFadeIn)
        {
            yield return(base.StartCoroutine(this.StartScreenFadeIn(null)));
        }
        this.isFinishedStartLoading = true;
        bool isPenaltyLevelTwo = false;

        yield return(base.StartCoroutine(this.PenaltyCheck(delegate
        {
            GUIMain.BackToTOP("UIStartupCaution", 0.8f, 0.8f);
            isPenaltyLevelTwo = true;
        })));

        if (isPenaltyLevelTwo)
        {
            yield break;
        }
        GUIManager.ResetTouchingCount();
        yield return(base.StartCoroutine(this.ShowLoginBonusCampaign()));

        yield return(base.StartCoroutine(this.ShowLoginBonusNormal()));

        GameWebAPI.RespDataUS_GetPlayerInfo playerInfo = DataMng.Instance().RespDataUS_PlayerInfo;
        GameWebAPI.RespDataCM_LoginBonus    loginBonus = DataMng.Instance().RespDataCM_LoginBonus;
        if (loginBonus != null && loginBonus.loginBonus != null && loginBonus.loginBonus.normal != null && loginBonus.loginBonus.normal.Length > 0 && playerInfo != null && playerInfo.playerInfo != null && playerInfo.playerInfo.loginCount == 3)
        {
            bool   isReviewDialogClose = false;
            Action onFinishedAction    = delegate()
            {
                isReviewDialogClose = true;
            };
            LeadReview.ShowReviewConfirm(LeadReview.MessageType.TOTAL_LOGIN_COUNT_3DAYS, onFinishedAction, false);
            while (!isReviewDialogClose)
            {
                yield return(null);
            }
        }
        yield return(base.StartCoroutine(this.CheckRecoverBattle()));

        Loading.Display(Loading.LoadingType.LARGE, false);
        while (!AssetDataCacheMng.Instance().IsCacheAllReadyType(AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY))
        {
            yield return(null);
        }
        Loading.Invisible();
        TutorialObserver tutorialObserver = UnityEngine.Object.FindObjectOfType <TutorialObserver>();

        yield return(base.StartCoroutine(tutorialObserver.StartGuidance(new Action <bool>(this.StartedGuidance))));

        GUIFace.SetFacilityAlertIcon();
        ClassSingleton <FaceMissionAccessor> .Instance.faceMission.SetParticleMissionIcon();

        yield break;
    }