Example #1
0
    public void Init()
    {
        //ソート&フィルタ実行
        friendDataList = friendBaseList.Exec(SORT_OBJECT_TYPE.FRIEND_LIST);
        IsViewEmpty    = (friendDataList.Count == 0) ? true : false;

        if (scrollContent != null)
        {
            scrollContent.Initialize(this);
        }

        SetUpButtons();
        SetStatusType(m_SortInfo);
        SetFilterText(m_SortInfo);
        scrollRect.verticalNormalizedPosition = 1f;
    }
Example #2
0
 /// <summary>
 /// ソート実行(データのみ)
 /// </summary>
 /// <param name="sortInfo"></param>
 public void ExecSortOnly(LocalSaveSortInfo sortInfo)
 {
     SetUpSortData(sortInfo);
     Units = m_unitBaseList.Exec(SORT_OBJECT_TYPE.UNIT_LIST);
 }
Example #3
0
    public void setup(MasterDataGacha gachaMaster,
                      MasterDataStepUpGachaManage stepUpManageMaster,
                      uint assgin_id,
                      bool usedTip,
                      string title)
    {
        if (gachaMaster == null)
        {
            return;
        }

        MasterDataGacha _master = gachaMaster;

        if (_master.type != MasterDataDefineLabel.GachaType.STEP_UP &&
            _master.rainbow_decide == assgin_id)
        {
            // 確定ラインナップの場合
            _master = MasterFinder <MasterDataGacha> .Instance.Find(_master.rainbow_decide);

            if (_master == null)
            {
                return;
            }
        }

        TitleText = title;

        uint startTimeU = _master.timing_start;
        uint endTimeU   = _master.timing_end;

        // 販売日程(終了日が無期限のときは表示しない)
        DateText = "";
        if (endTimeU != 0)
        {
            string   dateFormat = GameTextUtil.GetText("scratch_display2");
            DateTime startTime  = TimeUtil.GetDateTime(startTimeU);
            DateTime endTime    = TimeUtil.GetDateTime(endTimeU).SubtractAMinute();
            DateText = String.Format(dateFormat,
                                     startTime.ToString("yyyy/MM/dd(HH:mm)"),
                                     endTime.ToString("yyyy/MM/dd(HH:mm)"));
        }

        var guide_master_type = EMASTERDATA_SERVER.GACHA_GROUP;
        var gachatextreftype  = MasterDataDefineLabel.GachaTextRefType.NONE;

        uint gacha_fix_id = 0;
        uint _step_id     = 0;
        uint _assgin_id   = 0;

        if (_master.type == MasterDataDefineLabel.GachaType.STEP_UP)
        {
            guide_master_type = EMASTERDATA_SERVER.STEP_UP_GACHA;

            var _stepUpGachaMaster = MasterDataUtil.GetMasterDataStepUpGachaFromGachaID(_master.fix_id);
            if (_stepUpGachaMaster != null)
            {
                gacha_fix_id = _stepUpGachaMaster.fix_id;
            }
            else
            {
#if BUILD_TYPE_DEBUG
                string text = String.Format("StepUpGachaMaster.gacha_idに\n「{0}」が未定義です", _master.fix_id);
                DialogManager.Open1B_Direct("ScratchLineUpDialog",
                                            text,
                                            "common_button7", true, true).
                SetOkEvent(() =>
                {
                });
#endif
            }

            _step_id = stepUpManageMaster.fix_id;

            _assgin_id = assgin_id;

            if (stepUpManageMaster.normal1_assign_id == assgin_id)
            {
                gachatextreftype = MasterDataDefineLabel.GachaTextRefType.NOMAL1_RATE_URL;
            }
            else if (stepUpManageMaster.normal2_assign_id == assgin_id)
            {
                gachatextreftype = MasterDataDefineLabel.GachaTextRefType.NOMAL2_RATE_URL;
            }
            else if (stepUpManageMaster.special_assign_id == assgin_id)
            {
                gachatextreftype = MasterDataDefineLabel.GachaTextRefType.SPECIAL_RATE_URL;
            }

            if (gachatextreftype != MasterDataDefineLabel.GachaTextRefType.NONE)
            {
                m_ProbabilityUrl = MasterDataUtil.GetGachaText(EMASTERDATA_SERVER.STEP_UP_GACHA_MANAGE,
                                                               _step_id,
                                                               gachatextreftype);
            }
        }
        else
        {
            guide_master_type = EMASTERDATA_SERVER.GACHA_GROUP;
            gacha_fix_id      = _master.gacha_group_id;

            gachatextreftype = MainMenuParam.m_GachaRainbowDecide == assgin_id
                                ? MasterDataDefineLabel.GachaTextRefType.SPECIAL_RATE_URL
                                : MasterDataDefineLabel.GachaTextRefType.NOMAL1_RATE_URL;

            m_ProbabilityUrl = MasterDataUtil.GetGachaText(guide_master_type,
                                                           gacha_fix_id,
                                                           gachatextreftype);
        }

        //ガイドライン
        m_GuidLineText = MasterDataUtil.GetGachaText(guide_master_type,
                                                     gacha_fix_id,
                                                     MasterDataDefineLabel.GachaTextRefType.GUIDLINE);


        //確率URL
        if (m_ProbabilityUrl.Length > 0)
        {
            ProbabilityText = GameTextUtil.GetText("Gacha_step_05");
            IsProbability   = true;
        }
        else
        {
            IsProbability = false;
        }

        // ガイドラインボタン表示フラグ
        IsUsedTip = usedTip;

        // 排出ユニット一覧
        ServerDataUtilSend.SendPacketAPI_GetGachaLineup((int)_master.fix_id, _step_id, _assgin_id)
        .setSuccessAction(_data =>
        {
            SortList <LineUpListItemContex> tmpLineup = new SortList <LineUpListItemContex>();
            PacketStructGachaLineup[] lineup          = _data.GetResult <RecvGetGachaLineup>().result.gacha_assign_unit_list;
            for (int i = 0; i < lineup.Length; i++)
            {
                LineUpListItemContex newItem = new LineUpListItemContex(i, lineup[i]);
                //newItem.DidSelectItem += OnSelectItem;
                tmpLineup.Body.Add(newItem);
            }
            tmpLineup.AddSortInfo(SORT_PARAM.RATIO_UP, SORT_ORDER.DESCENDING);
            tmpLineup.AddSortInfo(SORT_PARAM.LIMITED, SORT_ORDER.DESCENDING);
            tmpLineup.AddSortInfo(SORT_PARAM.GROUP_ID, SORT_ORDER.ASCENDING);
            tmpLineup.AddSortInfo(SORT_PARAM.RARITY, SORT_ORDER.DESCENDING);
            tmpLineup.AddSortInfo(SORT_PARAM.ID, SORT_ORDER.ASCENDING);

            m_RecvGachaLineup = tmpLineup.Exec(SORT_OBJECT_TYPE.LINUP_LIST);

            scrollContent.Initialize(this);
        })
        .setErrorAction(_date =>
        {
            Close();
        })
        .SendStart();

        //BackKey設定
        AndroidBackKeyManager.Instance.StackPush(gameObject, OnCloseButton);
    }