Пример #1
0
 private void AfterChatRequestMember(GameWebAPI.RespData_ChatRequestMember data)
 {
     if (ChatTools.CheckOnFLG(data.result))
     {
         CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(delegate(int i)
         {
             this.ClickSearchBackBtn();
         }, "CMD_ModalMessage", null) as CMD_ModalMessage;
         cmd_ModalMessage.Title = StringMaster.GetString("ChatConfirmTitle");
         cmd_ModalMessage.Info  = StringMaster.GetString("ChatSearch-07");
         if (data.approvalType == 1)
         {
             this.UpdateJoinGroupData();
             this.SendJoinMessage();
         }
         else
         {
             this.UpdateRequestGroupData();
         }
     }
 }
Пример #2
0
 public void SetVersionUpMonsterIcon(bool canVersionUp, bool onlyGrayOut)
 {
     this.SetSortMessageColor(ConstValue.DIGIMON_GREEN);
     if (canVersionUp)
     {
         if (!onlyGrayOut)
         {
             this.SortMess = StringMaster.GetString("CharaIcon-05");
             this.SetSortMessageColor(ConstValue.DIGIMON_YELLOW);
         }
     }
     else
     {
         this.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE);
         if (!onlyGrayOut)
         {
             this.SortMess = StringMaster.GetString("CharaIcon-06");
             this.SetSortMessageColor(ConstValue.DIGIMON_BLUE);
         }
     }
 }
Пример #3
0
        protected override void OnUpdatedParts(int listPartsIndex)
        {
            List <EvolutionDiagramData.IconMonster> routeMapData = this.listRoot.GetRouteMapData();

            if (routeMapData != null && listPartsIndex < routeMapData.Count && routeMapData[listPartsIndex] != null)
            {
                EvolutionDiagramData.IconMonster iconMonster = routeMapData[listPartsIndex];
                this.monsterIcon.SetMonsterImage(iconMonster.master);
                if (!MonsterPicturebookData.ExistPicturebook(iconMonster.master.Group.monsterCollectionId))
                {
                    this.monsterIcon.Message.SetSortText(StringMaster.GetString("EvolutionUnkown"));
                }
                else
                {
                    this.monsterIcon.Message.ClearSortText();
                }
                this.growStep.text     = MonsterGrowStepData.GetGrowStepName(iconMonster.master.Group.growStep);
                this.monsterName.text  = iconMonster.master.Group.monsterName;
                this.specificName.text = MonsterSpecificTypeData.GetSpecificTypeName(iconMonster.master.Group.monsterStatusId);
            }
        }
    private IEnumerator InitReinforceTOP(Action <int> f, float sizeX, float sizeY, float aT)
    {
        bool success = false;

        GameWebAPI.RespDataCP_Campaign.CampaignInfo trainExpUpData    = DataMng.Instance().GetCampaignInfo(GameWebAPI.RespDataCP_Campaign.CampaignType.TrainExpUp);
        GameWebAPI.RespDataCP_Campaign.CampaignInfo trainCostDownData = DataMng.Instance().GetCampaignInfo(GameWebAPI.RespDataCP_Campaign.CampaignType.TrainCostDown);
        if (trainExpUpData == null && trainCostDownData == null)
        {
            APIRequestTask task = DataMng.Instance().RequestCampaignAll(false);
            yield return(base.StartCoroutine(task.Run(delegate
            {
                success = true;
            }, delegate(Exception nop)
            {
                success = false;
            }, null)));
        }
        else
        {
            success = true;
        }
        if (success)
        {
            base.PartsTitle.SetTitle(StringMaster.GetString("ReinforcementTitle"));
            this.InitMonsterList(true);
            this.ShowChgInfo();
            this.CalcAndShowLevelChange();
            this.UpdateClusterNum();
            base.ShowDLG();
            base.SetTutorialAnyTime("anytime_second_tutorial_reinforcement");
            base.Show(f, sizeX, sizeY, aT);
        }
        else
        {
            GUICollider.EnableAllCollider("CMD_ReinforcementTOP");
            base.ClosePanel(true);
        }
        RestrictionInput.EndLoad();
        yield break;
    }
    public override void ShowGUI()
    {
        base.ShowGUI();
        int status = this.data.status;

        if (status != 2)
        {
            if (status != 3)
            {
                if (status == 4)
                {
                    this.SetClearIcon();
                }
            }
            else
            {
                this.goNEW.SetActive(false);
            }
        }
        else
        {
            this.ngSPR_NEW.MakePixelPerfect();
        }
        if (this.ngTXT_AREA != null)
        {
            if (CMD_QuestTOP.instance.IsSpecialDungeon())
            {
                this.ngTXT_AREA.text = StringMaster.GetString("QuestSpecial");
            }
            else
            {
                this.ngTXT_AREA.text = string.Format(StringMaster.GetString("GUIListPartsA_txt"), int.Parse(this.data.worldStageM.worldStageId));
            }
        }
        if (this.ngTXT_AREA_NAME != null)
        {
            this.ngTXT_AREA_NAME.text = this.data.worldStageM.name;
        }
        this.SetStageGimmick();
    }
 private void UpdateEvolutionRestTime()
 {
     if (!this.canEvolveParticle.activeSelf)
     {
         this.restTimeUpdateTime -= Time.unscaledDeltaTime;
         if (string.IsNullOrEmpty(this.data.userMonster.growEndDate))
         {
             this.canEvolveParticle.SetActive(true);
             this.ngTX_EXP.text = StringMaster.GetString("Garden-10");
         }
         else if (0f >= this.restTimeUpdateTime)
         {
             this.restTimeUpdateTime = 1f;
             DateTime d        = DateTime.Parse(this.data.userMonster.growEndDate);
             TimeSpan timeSpan = d - ServerDateTime.Now;
             if (0.0 >= timeSpan.TotalSeconds)
             {
                 this.canEvolveParticle.SetActive(true);
                 this.ngTX_EXP.text = StringMaster.GetString("Garden-10");
             }
             else
             {
                 string arg = string.Empty;
                 if (0 < (int)timeSpan.TotalHours)
                 {
                     arg = string.Format(StringMaster.GetString("SystemTimeHM"), timeSpan.Hours.ToString(), timeSpan.Minutes.ToString());
                 }
                 else if (0 < timeSpan.Minutes)
                 {
                     arg = string.Format(StringMaster.GetString("SystemTimeMS"), timeSpan.Minutes.ToString(), timeSpan.Seconds.ToString());
                 }
                 else
                 {
                     arg = string.Format(StringMaster.GetString("SystemTimeS"), timeSpan.Seconds.ToString());
                 }
                 this.ngTX_EXP.text = string.Format(StringMaster.GetString("Garden-09"), arg);
             }
         }
     }
 }
Пример #7
0
    private void InitInfo()
    {
        this.multiBattleData    = ClassSingleton <MultiBattleData> .Instance;
        this.isMockBattle       = !(this.multiBattleData.MockBattleUserCode == "0");
        this.previousUserStatus = this.multiBattleData.PvPUserDatas.Where((MultiBattleData.PvPUserData item) => item.userStatus.userId == this.multiBattleData.MyPlayerUserId).Select((MultiBattleData.PvPUserData item) => item.userStatus).First <GameWebAPI.ColosseumUserStatus>();
        this.pvpResultData      = this.multiBattleData.BattleEndResponse;
        foreach (GameWebAPI.RespDataMA_ColosseumRankM.ColosseumRank colosseumRank in MasterDataMng.Instance().RespDataMA_ColosseumRankMaster.colosseumRankM)
        {
            this.rankDataDict.Add(colosseumRank.colosseumRankId, colosseumRank);
        }
        this.getClusterLabel.text  = "0";
        this.fluctuateDpLabel.text = "0";
        GameWebAPI.RespDataMA_ColosseumRankM.ColosseumRank colosseumRank2 = this.rankDataDict[this.previousUserStatus.colosseumRankId.ToString()];
        this.currentDpLabel.text = this.previousUserStatus.score.ToString();
        bool flag = this.multiBattleData.BattleResult == 1;

        if (flag && !this.isMockBattle)
        {
            this.nowTotalWin = this.previousUserStatus.winTotal + 1;
        }
        else
        {
            this.nowTotalWin = this.previousUserStatus.winTotal;
        }
        this.totalWinNum.text = string.Format(StringMaster.GetString("MyColosseumTotalWinNum"), this.nowTotalWin.ToString());
        if (this.isMockBattle)
        {
            this.nextRankupWinNum.text = string.Empty;
        }
        else if (this.pvpResultData.battleRecord != null)
        {
            this.nextRankupWinNum.text = string.Format(StringMaster.GetString("ColosseumRankAGroup"), this.pvpResultData.battleRecord.count, this.pvpResultData.battleRecord.winPercent);
        }
        else
        {
            this.nextRankupWinNum.text = string.Format(StringMaster.GetString("NextRankupNum"), int.Parse(colosseumRank2.maxScore) + 1 - this.nowTotalWin);
        }
        this.rankSprite.spriteName = MultiTools.GetPvPRankSpriteName(int.Parse(colosseumRank2.colosseumRankId));
        this.UpdateItemNum();
    }
Пример #8
0
 public static void SetTimeText(UILabel label, int totalSeconds, DateTime restTimeDate)
 {
     if (totalSeconds > 0)
     {
         int num = totalSeconds / GUIBannerParts.DAY_SECONDS;
         if (1 <= num)
         {
             GUIBannerParts.SetActiveRestTime(true, label);
             GUIBannerParts.SetDateFormat(label, restTimeDate);
         }
         else
         {
             int num2 = (totalSeconds - GUIBannerParts.DAY_SECONDS * num) / GUIBannerParts.HOUR_SECONDS;
             if (1 <= num2)
             {
                 GUIBannerParts.SetActiveRestTime(true, label);
                 GUIBannerParts.SetDateFormat(label, restTimeDate);
             }
             else
             {
                 GUIBannerParts.SetActiveRestTime(true, label);
                 int num3 = (totalSeconds - GUIBannerParts.DAY_SECONDS * num - GUIBannerParts.HOUR_SECONDS * num2) / GUIBannerParts.MINUTES_SECONDS;
                 int num4 = totalSeconds % GUIBannerParts.MINUTES_SECONDS;
                 if (num3 >= 1)
                 {
                     label.text = string.Format(StringMaster.GetString("CountDownMS"), num3, num4);
                 }
                 else
                 {
                     label.text = string.Format(StringMaster.GetString("CountDownS"), num4);
                 }
             }
         }
     }
     else
     {
         GUIBannerParts.SetActiveRestTime(true, label);
         label.text = StringMaster.GetString("CountDownEnd");
     }
 }
 public override void OnTouchEnded(Touch touch, Vector2 pos, bool flag)
 {
     if (GUICollider.IsAllColliderDisable())
     {
         return;
     }
     if (!base.activeCollider)
     {
         return;
     }
     base.OnTouchEnded(touch, pos, flag);
     if (flag)
     {
         float magnitude = (this.beganPostion - pos).magnitude;
         if (magnitude < 40f && !this.isTouchEndFromChild)
         {
             if (this.WorldDungeonData.status == 1)
             {
                 string text = this.MakeStringLockStatus();
                 if (!string.IsNullOrEmpty(text))
                 {
                     CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
                     cmd_ModalMessage.Title            = StringMaster.GetString("QuestClearConditionTitle");
                     cmd_ModalMessage.InfoWithNoReturn = text;
                 }
             }
             else if (!this.IsEventStage)
             {
                 if (CMD_QuestTOP.instance != null)
                 {
                     CMD_QuestTOP.instance.OnClickedDungeon(this.WorldDungeonData, this.ngTXT_STAGE.text, this.campaignInfo);
                 }
             }
             else
             {
                 this.OnSelectEventStage();
             }
         }
     }
 }
Пример #10
0
 private void DownloadConfirmation(int size, Action callback, bool returnConfirmation = false)
 {
     if (size <= 0)
     {
         callback();
         return;
     }
     string[] array = new string[]
     {
         StringMaster.GetString("DownloadSizeKB"),
         StringMaster.GetString("DownloadSizeMB"),
         StringMaster.GetString("DownloadSizeGB")
     };
     ScriptUtil.SIZE_TYPE size_TYPE = ScriptUtil.SIZE_TYPE.KILOBYTE;
     ScriptUtil.ShowCommonDialogForMessage(delegate(int index)
     {
         if (index == 0)
         {
             callback();
         }
         else if (returnConfirmation)
         {
             ScriptUtil.ShowCommonDialog(delegate(int id)
             {
                 if (id == 0)
                 {
                     GUIMain.BackToTOP("UIStartupCaution", 0.8f, 0.8f);
                 }
                 else
                 {
                     this.DownloadConfirmation(size, callback, false);
                 }
             }, "BackKeyConfirmTitle", "DownloadSizeExit", "SEInternal/Common/se_106");
         }
         else
         {
             GUIMain.BackToTOP("UIStartupCaution", 0.8f, 0.8f);
         }
     }, StringMaster.GetString("DownloadSizeTitle"), string.Format(StringMaster.GetString("DownloadSizeInfo"), ScriptUtil.CheckSize(size, ref size_TYPE), array[(int)size_TYPE]), "SEInternal/Common/se_106");
 }
 private void CountDown()
 {
     this.totalSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (99999999 <= this.totalSeconds)
     {
         this.totalSeconds = GUIBannerParts.GetRestTimeOneDaySeconds(this.restTimeDate);
     }
     if (this.data.countDownDispFlg)
     {
         GUIBannerParts.SetTimeTextForDayOfWeek(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate, false);
     }
     else
     {
         GUIBannerParts.SetTimeText(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate);
     }
     if (0 >= this.totalSeconds)
     {
         this.ngTX_TIME_LIMIT.text = StringMaster.GetString("ExchangeCloseTitle");
         base.CancelInvoke("CountDown");
         this.DisableBuyButtons();
     }
 }
Пример #12
0
    public string GetTitle(CMD_Mission.MissionType missionType)
    {
        string result = string.Empty;

        if (missionType == CMD_Mission.MissionType.Beginner)
        {
            result = StringMaster.GetString("MissionTitleBeginner");
        }
        else if (missionType == CMD_Mission.MissionType.Midrange)
        {
            result = StringMaster.GetString("MissionTitleMidrange");
        }
        else if (missionType == CMD_Mission.MissionType.Daily)
        {
            result = StringMaster.GetString("MissionTitleDaily");
        }
        else if (missionType == CMD_Mission.MissionType.Total)
        {
            result = StringMaster.GetString("MissionTitleAccumulation");
        }
        return(result);
    }
 public void OnCompletedSaleChip()
 {
     this.UpdateCluster();
     this.saleUserChipList.Clear();
     this.chipList.SetAllSelectColor(false);
     this.saleClusterMessageLabel.text = "0";
     this.totalPrice   = 0;
     this.userChipList = this.ConvertChipList(ChipDataMng.userChipData);
     this.chipList.ReAllBuild(this.userChipList, false, false);
     this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
     this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
     foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList in this.userChipList)
     {
         if (userChipList.userMonsterId > 0)
         {
             this.chipList.SetSelectColor(userChipList.userChipId, true);
         }
     }
     this.messageLabel.gameObject.SetActive(this.userChipList.Length == 0);
     this.listCountLabel.text = string.Format(StringMaster.GetString("SystemFraction"), ChipDataMng.userChipData.userChipList.Length, DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.chipLimitMax);
     this.EnableSaleDecisionButton(false);
 }
 private void CheckPayAssetsNumber(int price, int playCount)
 {
     MasterDataMng.AssetCategory prizeAssetsCategory = this.gashaInfo.GetPrizeAssetsCategory();
     if (UserInventory.CheckOverNumber(prizeAssetsCategory, 0))
     {
         FactoryLimitOverNotice.CreateDialog(prizeAssetsCategory, LimitOverNoticeType.GASHA);
     }
     else
     {
         MasterDataMng.AssetCategory costAssetsCategory = this.gashaInfo.priceType.GetCostAssetsCategory();
         string costAssetsValue = this.gashaInfo.priceType.GetCostAssetsValue();
         int    num             = UserInventory.GetNumber(costAssetsCategory, costAssetsValue);
         if (this.isTutorial && num < price)
         {
             num = price;
         }
         if (num < price)
         {
             if (costAssetsCategory == MasterDataMng.AssetCategory.DIGI_STONE)
             {
                 CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(new Action <int>(this.OnClosedShopOpenConfirm), "CMD_Confirm", null) as CMD_Confirm;
                 cmd_Confirm.Title      = this.gashaInfo.gachaName;
                 cmd_Confirm.Info       = StringMaster.GetString("GashaShortage");
                 cmd_Confirm.BtnTextYes = StringMaster.GetString("SystemButtonGoShop");
                 cmd_Confirm.BtnTextNo  = StringMaster.GetString("SystemButtonClose");
             }
         }
         else
         {
             GameWebAPI.GA_Req_ExecGacha useDetail = new GameWebAPI.GA_Req_ExecGacha
             {
                 gachaId   = int.Parse(this.gashaInfo.gachaId),
                 playCount = playCount,
                 itemCount = num
             };
             this.cofirmDialog = FactoryPayConfirmNotice.CreateDialog(costAssetsCategory, costAssetsValue, this.gashaInfo.gachaName, num, price, new Action(this.OnPushedConfirmYesButton), playCount, useDetail);
         }
     }
 }
Пример #15
0
    public void OnTapShortCutButton()
    {
        UserFacility userFacility = Singleton <UserDataMng> .Instance.GetUserFacility(this.userFacilityID);

        int cropCount = this.GetCropCount(this.GetPassSeconds(), userFacility.level);
        FacilityMeatFieldM facilityMeatFarmMaster = FarmDataManager.GetFacilityMeatFarmMaster(userFacility.level);
        int num = int.Parse(facilityMeatFarmMaster.maxMeatNum);

        if (cropCount >= num)
        {
            CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
            cmd_ModalMessage.Title   = StringMaster.GetString("MeatShortCutTitle3");
            cmd_ModalMessage.Info    = StringMaster.GetString("MeatShortCutText3");
            cmd_ModalMessage.BtnText = "OK";
        }
        else
        {
            CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(new Action <int>(this.OnTapMeatShortCut), "CMD_Confirm", null) as CMD_Confirm;
            cmd_Confirm.Title = StringMaster.GetString("MeatShortCutTitle1");
            cmd_Confirm.Info  = string.Format(StringMaster.GetString("MeatShortCutText1"), ConstValue.MEAT_SHORTCUT_DEGISTONE_NUM);
        }
    }
Пример #16
0
    private void ActMIconShort(MonsterData tappedMonsterData)
    {
        if (this.DataChg != null)
        {
            GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.DataChg);

            icon.DimmMess = string.Empty;
            icon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.ACTIVE);
            icon.SetTouchAct_S(new Action <MonsterData>(this.ActMIconShort));
        }
        this.DataChg = tappedMonsterData;
        if (this.DataChg != null)
        {
            GUIMonsterIcon icon2 = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(this.DataChg);

            icon2.DimmMess = StringMaster.GetString("SystemSelect");
            icon2.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.DISABLE);
            icon2.SetTouchAct_S(null);
            this.SetSelectedCharChg();
            this.SelectButtonActive(true);
        }
    }
Пример #17
0
    public void SetData(MonsterData monsterData)
    {
        this.goMN_DescriptionTXT.text = string.Format(StringMaster.GetString("CharaTapFriendshipUp"), monsterData.monsterMG.monsterName);
        this.monsterBasicInfo.SetMonsterData(monsterData);
        this.monsterStatusList.SetValues(monsterData, false, false);
        this.monsterMedalList.SetValues(monsterData.userMonster);
        Transform      transform      = this.goMN_ICON_NOW.transform;
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, transform.localScale, transform.localPosition, transform.parent, true, false);

        guimonsterIcon.Data = monsterData;
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.ActMIconLong));
        UIWidget component  = this.goMN_ICON_NOW.GetComponent <UIWidget>();
        UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(guimonsterIcon.transform, add);
        }
        this.goMN_ICON_NOW.SetActive(false);
    }
Пример #18
0
    public void OnPushedCloseButton()
    {
        FarmRoot instance = FarmRoot.Instance;

        if (null != instance)
        {
            if (instance.isEdit)
            {
                CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(new Action <int>(this.OnPushedCloseYesButton), "CMD_Confirm", null) as CMD_Confirm;
                cmd_Confirm.Title = StringMaster.GetString("FarmEditCloseTitle");
                cmd_Confirm.Info  = StringMaster.GetString("FarmEditCloseInfo");
            }
            else
            {
                this.Close();
            }
        }
        else
        {
            this.Close();
        }
    }
 public void StartEnemyFailedTimer(Action action, BattleUIControlPvP.DialogType dialogType)
 {
     if (this.battleDialog.IsAlreadyOpen())
     {
         return;
     }
     if (this.battleDialog.gameObject.activeSelf)
     {
         base.stateManager.uiControlPvP.StopAttackTimer();
         string waitingConnectionFormat = string.Empty;
         if (dialogType == BattleUIControlPvP.DialogType.EnemyCount)
         {
             waitingConnectionFormat = StringMaster.GetString("BattleUI-22");
             this.battleDialog.StartFailedTimer(waitingConnectionFormat, action, true);
         }
         else if (dialogType == BattleUIControlPvP.DialogType.MyCount)
         {
             waitingConnectionFormat = StringMaster.GetString("BattleUI-44");
             this.battleDialog.StartFailedTimer(waitingConnectionFormat, action, false);
         }
     }
 }
Пример #20
0
 public static void SetVersionUpCondition(List <HaveSoulData> almightyHsdL, GUIMonsterIcon monsterIcon, MonsterData monsterData, bool isOnlyDim = false)
 {
     if (VersionUpMaterialData.CanVersionUp(monsterData.monsterM, monsterData.userMonster, almightyHsdL))
     {
         if (isOnlyDim)
         {
             return;
         }
         monsterIcon.SortMess = StringMaster.GetString("CharaIcon-05");
         monsterIcon.SetSortMessageColor(ConstValue.DIGIMON_YELLOW);
     }
     else
     {
         monsterIcon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE);
         if (isOnlyDim)
         {
             return;
         }
         monsterIcon.SortMess = StringMaster.GetString("CharaIcon-06");
         monsterIcon.SetSortMessageColor(ConstValue.DIGIMON_BLUE);
     }
 }
Пример #21
0
 public void ShowGUI(Texture buttonImage)
 {
     base.ShowGUI();
     this.bgSprite.color = this.normalBGColor;
     this.restTimeDate   = DateTime.Parse(this.gashaInfo.endTime);
     this.totalSeconds   = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (this.totalSeconds < 99999999)
     {
         GUIBannerParts.SetTimeText(this.timeLabel, this.totalSeconds, this.restTimeDate);
     }
     else
     {
         this.timeLabel.text = StringMaster.GetString("GashaRegular");
     }
     if (0 < this.totalSeconds)
     {
         base.InvokeRepeating("CountDown", 1f, 1f);
     }
     this.bannerTex.mainTexture = buttonImage;
     this.ShowAbleCount();
     this.SetNew();
 }
Пример #22
0
 private void ApplyLeaderSkill(BattleStartAction.LeaderSkillUI leaderSkillUI, bool isHavingLeaderSkill, string leaderSkillName, bool isChange = false)
 {
     if (isChange)
     {
         leaderSkillUI.leaderSkillLocalize.text = StringMaster.GetString("BattleNotice-17");
     }
     else
     {
         leaderSkillUI.leaderSkillLocalize.text = StringMaster.GetString("BattleNotice-05");
     }
     if (string.IsNullOrEmpty(leaderSkillName))
     {
         leaderSkillUI.leaderSkillNamePlayer.text = StringMaster.GetString("BattleNotice-18");
     }
     else
     {
         leaderSkillUI.leaderSkillNamePlayer.text = leaderSkillName;
     }
     leaderSkillUI.leaderSkillLocalize.gameObject.SetActive(isHavingLeaderSkill);
     leaderSkillUI.leaderSkillNamePlayer.gameObject.SetActive(isHavingLeaderSkill);
     leaderSkillUI.leaderSkillUIPlayer.SetActive(isHavingLeaderSkill);
 }
Пример #23
0
    private void ShowNextMonsterIcon()
    {
        Transform transform = this.goMONS_NEXT.transform;

        this.csNextMons = GUIMonsterIcon.MakePrefabByMonsterData(this.data.md_next, transform.localScale, transform.localPosition, transform.parent, true, false);
        this.goMONS_NEXT.SetActive(false);
        if (!MonsterPicturebookData.ExistPicturebook(this.data.md_next.monsterMG.monsterCollectionId))
        {
            this.csNextMons.SortMess = StringMaster.GetString("EvolutionUnkown");
            this.csNextMons.SetSortMessageColor(this.iconTextColor);
        }
        this.csNextMons.SetTouchAct_L(new Action <MonsterData>(this.OnLongPushedMonsterIcon));
        UIWidget component  = this.goMONS_NEXT.GetComponent <UIWidget>();
        UIWidget component2 = this.csNextMons.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = this.csNextMons.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(this.csNextMons.gameObject.transform, add);
        }
    }
 public void SetValues(MonsterData monsterData, bool setBaseStatus = false, bool showMaxLuck = false)
 {
     if (!setBaseStatus)
     {
         this.hpLabel.text           = monsterData.userMonster.hp;
         this.attackLabel.text       = monsterData.userMonster.attack;
         this.defenseLabel.text      = monsterData.userMonster.defense;
         this.magicAttackLabel.text  = monsterData.userMonster.spAttack;
         this.magicDefenceLabel.text = monsterData.userMonster.spDefense;
         this.speedLabel.text        = monsterData.userMonster.speed;
     }
     else
     {
         StatusValue statusValue = MonsterStatusData.GetStatusValue(monsterData.userMonster.monsterId, monsterData.userMonster.level);
         this.hpLabel.text           = statusValue.hp.ToString();
         this.attackLabel.text       = statusValue.attack.ToString();
         this.defenseLabel.text      = statusValue.defense.ToString();
         this.magicAttackLabel.text  = statusValue.magicAttack.ToString();
         this.magicDefenceLabel.text = statusValue.magicDefense.ToString();
         this.speedLabel.text        = statusValue.speed.ToString();
     }
     GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(monsterData.userMonster.monsterId).Simple;
     if (showMaxLuck)
     {
         this.luckLabel.text = string.Format(StringMaster.GetString("SystemFraction"), monsterData.userMonster.luck, simple.maxLuck);
     }
     else
     {
         this.luckLabel.text = monsterData.userMonster.luck.ToString();
     }
     if (!this.disableFriendshipMaxValue)
     {
         this.friendshipLabel.text = MonsterFriendshipData.GetMaxFriendshipFormat(monsterData.userMonster.friendship, monsterData.monsterMG.growStep);
     }
     else
     {
         this.friendshipLabel.text = monsterData.userMonster.friendship;
     }
 }
 private void SetTimeStatus()
 {
     if (this.data.closeTime == null)
     {
         this.ngTX_TIME_LIMIT.gameObject.SetActive(false);
         return;
     }
     this.restTimeDate = DateTime.Parse(this.data.closeTime);
     this.totalSeconds = GUIBannerParts.GetRestTimeSeconds(this.restTimeDate);
     if (this.data.countDownDispFlg)
     {
         if (99999999 <= this.totalSeconds)
         {
             this.totalSeconds = GUIBannerParts.GetRestTimeOneDaySeconds(this.restTimeDate);
         }
         GUIBannerParts.SetTimeTextForDayOfWeek(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate, false);
     }
     else if (99999999 > this.totalSeconds)
     {
         GUIBannerParts.SetTimeText(this.ngTX_TIME_LIMIT, this.totalSeconds, this.restTimeDate);
     }
     else
     {
         this.ngTX_TIME_LIMIT.text = string.Empty;
     }
     if (this.data.countDownDispFlg || !string.IsNullOrEmpty(this.ngTX_TIME_LIMIT.text))
     {
         if (0 < this.totalSeconds)
         {
             base.InvokeRepeating("CountDown", 1f, 1f);
         }
         else
         {
             this.ngTX_TIME_LIMIT.text = StringMaster.GetString("ExchangeCloseTitle");
             this.DisableBuyButtons();
         }
     }
 }
        public void SetErrorText(CMD_CharacterDetailed.LockMode mode)
        {
            switch (mode)
            {
            case CMD_CharacterDetailed.LockMode.Laboratory:
                if (CMD_PairSelectBase.instance.baseDigimon != null && CMD_PairSelectBase.instance.baseDigimon == CMD_CharacterDetailed.DataChg)
                {
                    this.SetErrorText(StringMaster.GetString("CharaDetailsNotLockBase"));
                }
                else if (CMD_PairSelectBase.instance.partnerDigimon != null && CMD_PairSelectBase.instance.partnerDigimon == CMD_CharacterDetailed.DataChg)
                {
                    this.SetErrorText(StringMaster.GetString("CharaDetailsNotLockPartner"));
                }
                else if (CMD_BaseSelect.ElementType == CMD_BaseSelect.ELEMENT_TYPE.BASE)
                {
                    this.SetErrorText(StringMaster.GetString("CharaDetailsNotLockBase"));
                }
                else if (CMD_BaseSelect.ElementType == CMD_BaseSelect.ELEMENT_TYPE.PARTNER)
                {
                    this.SetErrorText(StringMaster.GetString("CharaDetailsNotLockPartner"));
                }
                break;

            case CMD_CharacterDetailed.LockMode.Farewell:
                this.SetErrorText(StringMaster.GetString("CharaDetailsNotLockSale"));
                break;

            case CMD_CharacterDetailed.LockMode.Reinforcement:
            case CMD_CharacterDetailed.LockMode.Succession:
            case CMD_CharacterDetailed.LockMode.Arousal:
                this.SetErrorText(StringMaster.GetString("CharaDetailsNotLockPartner"));
                break;

            case CMD_CharacterDetailed.LockMode.Evolution:
                this.SetErrorText(StringMaster.GetString("CharaDetailsNotLockBase"));
                break;
            }
        }
Пример #27
0
 private void UpdateDetails(DataMng.ExperienceInfo experienceInfo)
 {
     if (this.maxLevelInfo.lev <= experienceInfo.lev || experienceInfo.expLevNext == 0)
     {
         NGUITools.SetActiveSelf(this.arrow.gameObject, false);
         NGUITools.SetActiveSelf(this.oldLevelTitle, false);
         NGUITools.SetActiveSelf(this.newLevelTitle, false);
         NGUITools.SetActiveSelf(this.oldLevel.gameObject, false);
         NGUITools.SetActiveSelf(this.newLevel.gameObject, false);
         NGUITools.SetActiveSelf(this.levelMaxMark, true);
         this.exp.text       = StringMaster.GetString("BattleResult-08");
         this.expNum.text    = StringMaster.GetString("CharaStatus-12");
         this.expGauge.value = 1f;
         this.isLevelMax     = true;
     }
     else
     {
         this.exp.text = StringMaster.GetString("BattleResult-02");
         int num = experienceInfo.expLevAll - experienceInfo.expLev;
         this.expNum.text    = num.ToString();
         this.expGauge.value = (float)experienceInfo.expLev / (float)experienceInfo.expLevAll;
     }
 }
Пример #28
0
 private void OnPushEvolutionConfirmYesButton(CMD confirmPopup, MonsterData monsterData)
 {
     if (this.growNeedStone <= DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point)
     {
         RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
         confirmPopup.SetCloseAction(delegate(int noop)
         {
             this.ExecGrow(monsterData);
         });
     }
     else
     {
         confirmPopup.SetCloseAction(delegate(int noop)
         {
             CMD_Confirm cmd_Confirm = GUIMain.ShowCommonDialog(null, "CMD_Confirm", null) as CMD_Confirm;
             cmd_Confirm.Title       = StringMaster.GetString("EvolutionTitle");
             cmd_Confirm.Info        = StringMaster.GetString("GashaShortage");
             cmd_Confirm.BtnTextYes  = StringMaster.GetString("SystemButtonGoShop");
             cmd_Confirm.BtnTextNo   = StringMaster.GetString("SystemButtonClose");
             cmd_Confirm.SetActionYesButton(new Action <CMD>(this.OnPushConfirmShopButton));
         });
     }
 }
Пример #29
0
 private void CallbackConfirmMove(int selectButtonIndex, MonsterData monster)
 {
     if (selectButtonIndex == 0)
     {
         if (3 > this.growingNum)
         {
             if (null != CMD_DigiGarden.instance && this.isOfflineModeFlag)
             {
                 this.OfflineMoveDigiGarden();
             }
             else
             {
                 base.StartCoroutine(this.MoveDigiGarden(monster));
             }
         }
         else
         {
             CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(null, "CMD_ModalMessage", null) as CMD_ModalMessage;
             cmd_ModalMessage.Title = StringMaster.GetString("Garden-03");
             cmd_ModalMessage.Info  = StringMaster.GetString("GardenGrowMax");
         }
     }
 }
Пример #30
0
    private void OnPushDecide()
    {
        CMD_ResearchModalAlert popup = null;

        if (MonsterStatusData.IsVersionUp(this.baseDigimon.GetMonsterMaster().Simple.rare))
        {
            popup = this.OpenAlertTargetMonster(this.baseDigimon, StringMaster.GetString("LaboratoryResearchAlertInfo3"));
        }
        if (null != popup)
        {
            popup.SetActionYesButton(delegate
            {
                popup.SetCloseAction(delegate(int noop)
                {
                    this.CheckPartnerMonster();
                });
            });
        }
        else
        {
            this.CheckPartnerMonster();
        }
    }