コード例 #1
0
ファイル: UnitNamePanel.cs プロジェクト: mliuzailin/GitGame
    public void setup(MasterDataParamChara _master)
    {
        IconSelect = MainMenuUtil.GetElementCircleSprite(_master.element);
        UnitIconImageProvider.Instance.Get(
            _master.fix_id,
            sprite =>
        {
            Icon = sprite;
        });

        CharaName = _master.name;
        string noFormat = GameTextUtil.GetText("unit_status1");

        CharaNo = string.Format(noFormat, _master.draw_id);
        Rarity  = (uint)_master.rare + 1;

        RaceImage = MainMenuUtil.GetTextKindSprite(_master.kind, false);
        if (_master.sub_kind != MasterDataDefineLabel.KindType.NONE)
        {
            SubRaceImage = MainMenuUtil.GetTextKindSprite(_master.sub_kind, false);
        }
        else
        {
            SubRaceImage = null;
        }

        AttributeImage      = MainMenuUtil.GetTextElementSprite(_master.element);
        AttributeImageColor = ColorUtil.GetElementLabelColor(_master.element);
    }
コード例 #2
0
    private void openSupportDialog()
    {
        uint   uid        = LocalSaveManager.Instance.LoadFuncUserID();
        string userIdText = string.Format(GameTextUtil.GetText("mt21q_content"), UnityUtil.CreateDrawUserID(uid));
        Dialog newDialog  = Dialog.Create(DialogType.DialogYesNo).SetStrongYes();

        newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "mt21q_title");
        newDialog.SetDialogText(DialogTextType.MainText, userIdText);
        newDialog.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button4");
        newDialog.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button5");
        newDialog.SetDialogEvent(DialogButtonEventType.YES, new System.Action(() =>
        {
            ResetButtons();
            //DG0-1944 お問い合わせは強制的に外部ブラウザーで表示する
            string support_url = MasterDataUtil.GetMasterDataGlobalParamTextFromID(GlobalDefine.WEB_LINK_SUPPORT);
            URLManager.OpenURL(support_url, true);
        }));
        newDialog.EnableFadePanel();
        newDialog.DisableCancelButton();
        newDialog.Show();

        newDialog.SetDialogEvent(DialogButtonEventType.NO, () =>
        {
            ResetButtons();
        });
    }
コード例 #3
0
    public LineUpListItemContex(int id, ServerDataDefine.PacketStructGachaLineup lineUp)
    {
        Id        = id;
        UnitId    = lineUp.id;
        Ratio     = lineUp.rate_up_icon;
        RatioText = lineUp.rate.Length > 0
                        ? String.Format(GameTextUtil.GetText("Gacha_step_06"), lineUp.rate)
                        : "";

        // レアリボン表示フラグ
        RareFlag = lineUp.limit_icon != 0 ? true : false;

        MasterDataParamChara master = MasterFinder <MasterDataParamChara> .Instance.Find((int)UnitId);

        // レア数
        RareStar = (int)master.rare + 1;

        // ユニット名
        string template = "{0}";

        template = lineUp.limit_icon != 0
                        ? GameTextUtil.GetText("scratch_rare01")
                        : GameTextUtil.GetText("scratch_normal01");
        NameText = String.Format(template, master.name);

        IconImage = null;

        RatioImage = null;

        setSortParamLineUp(lineUp, master);
    }
コード例 #4
0
    // Use this for initialization
    void Start()
    {
        Decision_text   = GameTextUtil.GetText("common_button7");
        Hero_select_msg = GameTextUtil.GetText("mastr_select");

        if (SafeAreaControl.HasInstance)
        {
            SafeAreaControl.Instance.enebleMask(m_TopMask, m_BottomMask);

            int bottom_space_height = SafeAreaControl.Instance.bottom_space_height;
            int bar_height          = SafeAreaControl.Instance.bar_height;
            if (bottom_space_height > 0)
            {
                int space = bottom_space_height + bar_height;

                RectTransform rect = m_BottomMask.GetComponent <RectTransform>();
                rect.AddLocalPositionY(space * -1);

                rect           = GetComponent <RectTransform>();
                rect.offsetMin = new Vector2(rect.offsetMin.x, rect.offsetMin.y + space);

                rect = m_BackGround.GetComponent <RectTransform>();
                rect.AddLocalPositionY((space / 2) * -1);

                rect           = m_HeroSelect.GetComponent <RectTransform>();
                rect.sizeDelta = new Vector2(rect.sizeDelta.x, rect.sizeDelta.y - 120);
            }
        }
    }
コード例 #5
0
    public void CreateList(PacketStructAchievementGroup[] packetGroupList)
    {
        if (packetGroupList.Length == 0)
        {
            return;
        }

        Missons.Clear(); // アイテムを空にする

        foreach (PacketStructAchievementGroup packetGroup in packetGroupList)
        {
            //----------------------------------------
            // ミッション表示ステータス決定
            //----------------------------------------
            //初期値は「NEW」にしておく
            MasterDataDefineLabel.AchievementState cState = MasterDataDefineLabel.AchievementState.NEW;
            string strState = "";
            Color  cColor   = ColorUtil.GetColor(APP_COLOR.LABEL_YELLOW);

            //string stateText
            if (packetGroup.clear_unacquired_cnt > 0)
            {                                                                 // (分子=分母且つ、ステータス2+3のミッション数>0の場合、または分子≠分母且つ、ステータス2+3のアチーブメント数>0の場合)
                cState   = MasterDataDefineLabel.AchievementState.GET_REWARD; // 報酬未取得の場合「GET REWARD!!」表示
                strState = GameTextUtil.GetText("ACHIEVEMENT_GP_STATE_GET_REWARD");
                cColor   = ColorUtil.GetColor(APP_COLOR.LABEL_LIGHT_BLUE);
            }
            else if (packetGroup.list_cnt != packetGroup.clear_cnt)
            {                                                          // 分子≠分母且つ、ステータス2+3のミッション数=0の場合
                cState   = MasterDataDefineLabel.AchievementState.NEW; // 「NEW!」表示
                strState = GameTextUtil.GetText("ACHIEVEMENT_GP_STATE_NEW");
                cColor   = ColorUtil.GetColor(APP_COLOR.LABEL_YELLOW);
            }
            else if (packetGroup.list_cnt == packetGroup.clear_cnt)
            {                                                            //分子=分母且つ、ステータス2+3のミッション数=0の場合
                cState   = MasterDataDefineLabel.AchievementState.CLEAR; // 「CLEAR」表示
                strState = GameTextUtil.GetText("ACHIEVEMENT_GP_STATE_CLEAR");
                cColor   = ColorUtil.GetColor(APP_COLOR.LABEL_PURPLE);
            }


            // 情報設定
            MissonGroupListItemContext group = new MissonGroupListItemContext();
            group.AchievementState      = cState;
            group.AchievementStateText  = strState;
            group.AchievementStateColor = cColor;
            group.GroupListData         = packetGroup;
            group.DetailText            = packetGroup.draw_msg;
            group.MissonClearCount      = packetGroup.clear_cnt;
            group.MissonMaxCount        = packetGroup.list_cnt;
            group.ProgressText          = string.Format(GameTextUtil.GetText("MISSION_GROUP_CNT")
                                                        , packetGroup.clear_cnt
                                                        , packetGroup.list_cnt);
            group.TextColor = (cState == MasterDataDefineLabel.AchievementState.CLEAR)
                            ? ColorUtil.COLOR_GRAY : ColorUtil.COLOR_WHITE;
            group.DidSelectItem += SelectedMissonGroupListItem;
            Missons.Add(group);
        }

        IsActiveEmptyText = (Missons.Count == 0);
    }
コード例 #6
0
    void PasswordDialog(bool isFirst)
    {
        uint uid = LocalSaveManager.Instance.LoadFuncUserID();
        LocalSaveTransferPassword TransferPassword = LocalSaveManager.Instance.LoadFuncTransferPassword();

        Dialog newDialog = Dialog.Create(DialogType.DialogOK);

        newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "he180q_title");
        string detail = "";

        if (isFirst == true)
        {
            detail = GameTextUtil.GetText("he180q_content1") + "\n";
        }
        int    dd     = TransferPassword.m_TimeLimit % 100;
        int    mm     = (TransferPassword.m_TimeLimit / 100) % 100;
        int    yy     = TransferPassword.m_TimeLimit / 10000;
        string yymmdd = yy.ToString("0000") + "/" + mm.ToString("00") + "/" + dd.ToString("00");

        detail = detail + string.Format(GameTextUtil.GetText("he180q_content2"), UnityUtil.CreateDrawUserID(uid), TransferPassword.m_Password, yymmdd);
        newDialog.SetDialogText(DialogTextType.MainText, detail);
        newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button1");
        newDialog.SetDialogEvent(DialogButtonEventType.OK, () =>
        {
            m_OthersUser.PasswordText = GameTextUtil.GetText("he173p_button2_1");
        });
        newDialog.EnableFadePanel();
        newDialog.DisableCancelButton();
        newDialog.Show();
    }
コード例 #7
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	ダイアログオープン:
     */
    //----------------------------------------------------------------------------
    static public Dialog OpenInGameResetFix(int nStoneCt)
    {
        //--------------------------------
        // ダイアログ発行依頼
        //--------------------------------
        string strDialogTitle   = GameTextUtil.GetText("INGAME_RESET_AGREE_TITLE");
        string strDialogMessage = "";
        string strDialogBtn1Key = "";
        string strDialogBtn2Key = "";

        if (nStoneCt == 0)
        {
            strDialogMessage = GameTextUtil.GetText("INGAME_RESET_AGREE_NOTIP_MSG");
            strDialogBtn1Key = "INGAME_RESET_AGREE_NOTIP_BTN";
            strDialogBtn2Key = "common_button5";

            strDialogMessage = string.Format(strDialogMessage, nStoneCt);
        }
        else
        {
            strDialogMessage = GameTextUtil.GetText("INGAME_RESET_AGREE_MSG");
            strDialogBtn1Key = "INGAME_RESET_FIX_BTN_1";
            strDialogBtn2Key = "common_button5";

            strDialogMessage = string.Format(strDialogMessage, nStoneCt);
        }

        Dialog dialog = Open2B_Direct(strDialogTitle, strDialogMessage, strDialogBtn1Key, strDialogBtn2Key, false, true);

        dialog.DisableCancelButton();
        return(dialog);
    }
コード例 #8
0
    void Start()
    {
        string titleKey = "";

        switch (missionGroupType)
        {
        case ACHIEVEMENT_CATEGORY_TYPE.NORMAL:
            titleKey = "mission_tab3";
            break;

        case ACHIEVEMENT_CATEGORY_TYPE.EVENT:
            titleKey = "mission_tab2";
            break;

        case ACHIEVEMENT_CATEGORY_TYPE.DAILY:
            titleKey = "mission_tab1";
            break;

        case ACHIEVEMENT_CATEGORY_TYPE.QUEST:
            titleKey = "mission_tab4";
            break;

        case ACHIEVEMENT_CATEGORY_TYPE.REWARDED:
            titleKey = "mission_tab4";
            break;
        }

        if (m_MissionTab != null && titleKey.IsNullOrEmpty() == false)
        {
            m_MissionTab.TitleText = GameTextUtil.GetText(titleKey);
        }
    }
コード例 #9
0
ファイル: UnitLinkPanel.cs プロジェクト: mliuzailin/GitGame
 private void SetLinkDisable()
 {
     IsViewLinkStatus = false;
     IsViewNone       = true;
     IsViewParent     = false;
     NoneValue        = GameTextUtil.GetText("unit_linkstatus7");
 }
コード例 #10
0
    // プレゼントID → アイテムID×個数
    private string PresentText(int[][] present_ids)
    {
        string result = "";

        foreach (int[] ids in present_ids)
        {
            foreach (int id in ids)
            {
                var present = MasterFinder <MasterDataPresent> .Instance.Find(id);

                if (present == null)
                {
#if true
                    // プレゼントがみつかりません
                    result += string.Format("[MasterDataに該当プレセントがありません ID{0}]\n", id);
#endif
                }
                else
                {
                    // プレゼント内容文字列
                    result += "\n" + string.Format(GameTextUtil.GetText("pp4q_content_2"), MasterDataUtil.GetPresentName(present), MasterDataUtil.GetPresentCount(present));
                }
            }
        }
        return(result);
    }
コード例 #11
0
    private void initHero()
    {
        skillWindowTag.Tab_active = false;

        UnityUtil.SetObjectEnabledOnce(unitNamePanel.gameObject, false);
        UnityUtil.SetObjectEnabledOnce(unitSkillPanel.gameObject, false);
        UnityUtil.SetObjectEnabledOnce(unitLinkPanel.gameObject, false);
        UnityUtil.SetObjectEnabledOnce(unitParamPanel.gameObject, false);
        UnityUtil.SetObjectEnabledOnce(unitAilmentPanel.gameObject, false);
        UnityUtil.SetObjectEnabledOnce(heroDetailPanel.gameObject, true);

        Label_text = GameTextUtil.GetText("battle_infotext5");

        PacketStructHero hero = null;
        int unique_id         = UserDataAdmin.Instance.m_StructPlayer.current_hero_id;

        for (int i = 0; i < UserDataAdmin.Instance.m_StructHeroList.Length; ++i)
        {
            if (UserDataAdmin.Instance.m_StructHeroList[i].unique_id == unique_id)
            {
                hero = UserDataAdmin.Instance.m_StructHeroList[i];
            }
        }
        heroDetailPanel.SetDetail(hero);
        m_CharaIdx = GlobalDefine.PartyCharaIndex.HERO;
    }
コード例 #12
0
    /// <summary>
    /// フレンド申請選択ダイアログ
    /// </summary>
    /// <param name="_friend"></param>
    private void SelectFriend(FriendDataItem _friend)
    {
        SoundUtil.PlaySE(SEID.SE_MENU_OK2);

        m_SelectFriend = _friend;

        Dialog _newDialog = Dialog.Create(DialogType.DialogFriend).SetStrongYes();

        _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "fr156q_title");
        _newDialog.SetFriendInfo(m_SelectFriend.FriendData);
        _newDialog.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button4");
        _newDialog.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button5");
        _newDialog.SetDialogObjectEnabled(DialogObjectType.UnderText, true);
        string underFormat = GameTextUtil.GetText("fr156q_content");

        _newDialog.SetDialogText(DialogTextType.UnderText, string.Format(underFormat, m_SelectFriend.FriendData.user_name));
        _newDialog.SetMenuInButton(true);
        _newDialog.SetDialogTextFromTextkey(DialogTextType.InButtonText, "fr156q_button2");
        _newDialog.SetDialogEvent(DialogButtonEventType.YES, () =>
        {
            sendFriendConsent();
        });
        _newDialog.SetDialogEvent(DialogButtonEventType.INBUTTON, () =>
        {
            sendFriendRequestCancel();
        });
        _newDialog.EnableFadePanel();
        _newDialog.Show();
    }
コード例 #13
0
    /// <summary>
    /// フレンド申請キャンセル通信
    /// </summary>
    private void sendFriendRequestCancel()
    {
        uint[] selectFriendArray = new uint[1];
        selectFriendArray[0] = m_SelectFriend.FriendData.user_id;
        ServerDataUtilSend.SendPacketAPI_FriendRefusal(selectFriendArray)
        .setSuccessAction(_data =>
        {
            UserDataAdmin.Instance.m_StructFriendList = UserDataAdmin.FriendListClipNotExist(_data.GetResult <RecvFriendRefusal>().result.friend);

            Dialog _newDialog = Dialog.Create(DialogType.DialogOK);
            _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "fr159q_title");
            string mainFormat = GameTextUtil.GetText("fr159q_content");
            _newDialog.SetDialogText(DialogTextType.MainText, string.Format(mainFormat, m_SelectFriend.FriendData.user_name));
            _newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button1");
            _newDialog.SetDialogEvent(DialogButtonEventType.OK, () =>
            {
                MainMenuManager.Instance.SubTab.updateTabItem();

                updateFriendList();
            });
            _newDialog.Show();
        })
        .setErrorAction(_data =>
        {
            MainMenuUtil.openFriendRequestErrorDialog(_data.m_PacketCode);
        })
        .SendStart();
    }
コード例 #14
0
ファイル: OthersRename.cs プロジェクト: mliuzailin/GitGame
    public void OnClick()
    {
        TMP_InputField field = GetComponentInChildren <TMP_InputField>();

        if (field != null && OnClickAction != null)
        {
            TMP_TextInfo generatr = field.textComponent.textInfo;
            for (int i = 0; i < generatr.characterCount; i++)
            {
                TMP_CharacterInfo info = generatr.characterInfo[i];
#if BUILD_TYPE_DEBUG
                Debug.Log(i + " / " + "characterCount = " + info.pointSize);
#endif
                if (info.pointSize == 0)
                {
                    //文字幅がないものは表示できないフォントなのでエラー表示
                    Dialog newDialog = newDialog = Dialog.Create(DialogType.DialogOK);
                    newDialog.SetDialogText(DialogTextType.OKText, GameTextUtil.GetText("common_button1"));
                    newDialog.SetDialogText(DialogTextType.Title, GameTextUtil.GetText("error_response_title69"));
                    newDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "error_response_content69");
                    newDialog.SetDialogEvent(DialogButtonEventType.OK, new System.Action(() => { }));
                    newDialog.DisableCancelButton();
                    newDialog.Show();

                    return;
                }
            }

            OnClickAction(field.text);
        }
    }
コード例 #15
0
    //------------------------------------------------------------------------

    /*!
     *  @brief		更新処理
     */
    //------------------------------------------------------------------------
    public void Open(uint id)
    {
        SoundUtil.PlaySE(SEID.SE_BATLE_UI_OPEN);
        m_CharaId = id;
        m_Open    = true;

        initPanel();

        Label_text = GameTextUtil.GetText("battle_infotext4");

        //「ENEMY INFO」テキスト差し替え
        {
            uint area_category_id = ReplaceAssetManager.getAreaCategoryIDFromQuestID(BattleParam.m_QuestMissionID); //MainMenuParam.m_RegionIDからは直接は取らない(中断復帰時対策)
            MasterDataQuestAppearance[] questAppearance = MasterFinder <MasterDataQuestAppearance> .Instance.SelectWhere("where area_category_id = ?", area_category_id).ToArray();

            if (questAppearance.IsNullOrEmpty() == false)
            {
                //Label_text = GameTextUtil.GetText(questAppearance[0].enemy_info_text_key);
                // テキストキーではなく直接テキストが入っている
                Label_text = questAppearance[0].enemy_info_text_key;
            }
        }

        m_TargetWindowStep = eTargetWindowStep.OPEN_INIT;
    }
コード例 #16
0
 // Use this for initialization
 void Start()
 {
     if (m_Text != null)
     {
         m_Text.text = GameTextUtil.GetText("common_button1");
     }
 }
コード例 #17
0
 void Awake()
 {
     gameObject.GetComponent <M4uContextRoot>().Context = this;
     unitNamePanel    = InGameSkillWindowQuest2.setupPrefab <UnitNamePanel>("Prefab/UnitNamePanel/UnitNamePanel", windowPanelRoot);
     unitAilmentPanel = InGameSkillWindowQuest2.setupPrefab <UnitAilmentPanel>("Prefab/InGame/InGameUI/Menu/UnitAilmentPanel", windowPanelRoot);
     CloseText        = GameTextUtil.GetText("common_button6");
 }
コード例 #18
0
    //----------------------------------------------------------------------------

    /*!
     *          @brief	Unity固有処理:初期化処理	※初回のUpdateを呼び出す直前に呼出し
     */
    //----------------------------------------------------------------------------
    void Start()
    {
        //--------------------------------
        // インスペクタ側で設定があるならそれを反映
        //--------------------------------
        if (m_LabelTextList != null &&
            m_LabelTextList.Length > 0
            )
        {
            ClrText();
            for (int i = 0; i < m_LabelTextList.Length; i++)
            {
                AddText(GameTextUtil.GetText(m_LabelTextList[i]));
            }
        }
        // 色も
        if (m_LabelColorList != null &&
            m_LabelColorList.Length > 0
            )
        {
            ClrText();
            for (int i = 0; i < m_LabelColorList.Length; i++)
            {
                AddColor(m_LabelColorList[i]);
            }
        }

        //--------------------------------
        // 初回更新時に強制的にテキストを適用するためにフラグを立てておく
        //--------------------------------
        m_MessageParamFixSet = true;
    }
コード例 #19
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        uint userID = LocalSaveManager.Instance.LoadFuncUserID();

        m_OthersUser = GetComponentInChildren <OthersUser>();
        m_OthersUser.SetPositionAjustStatusBar(new Vector2(0, -180));

        m_OthersUser.OnRenameClickAction         = OnRename;
        m_OthersUser.OnPasswordClickAction       = OnPassword;
        m_OthersUser.OnGameDataDeleteClickAction = OnGameDataDelete;
        m_OthersUser.OnAchievementClickAction    = OnAchievement;
        m_OthersUser.OnLeaderboardClickAction    = OnLeaderboard;
        m_OthersUser.UserNameText = UserDataAdmin.Instance.m_StructPlayer.user.user_name;
        m_OthersUser.UserIDText   = UnityUtil.CreateDrawUserID(userID);
        m_OthersUser.TollTipNum   = UserDataAdmin.Instance.m_StructPlayer.have_stone_pay.ToString();
        m_OthersUser.FreeTipNum   = UserDataAdmin.Instance.m_StructPlayer.have_stone_free.ToString();
        if (LocalSaveManager.Instance.LoadFuncTransferPasswordChk() == false)
        {
            m_OthersUser.PasswordText = GameTextUtil.GetText("he173p_button1");
        }
        else
        {
            m_OthersUser.PasswordText = GameTextUtil.GetText("he173p_button2_1");
        }

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.NONE;
    }
コード例 #20
0
    /// <summary>
    /// リストの作成
    /// </summary>
    /// <param name="periodLoginMaster"></param>
    public void SetUpList(LoginBonusRecordListContext item)
    {
        SetCount(item.date_count);
        Presents.Clear();
        for (int i = 0; i < item.present_ids.Length; ++i)
        {
            int presentID = item.present_ids[i];
            MasterDataPresent presentMaster = MasterDataUtil.GetPresentParamFromID((uint)presentID);

            LoginBonusPresentListContext present = new LoginBonusPresentListContext();
            MainMenuUtil.GetPresentIcon(presentMaster, sprite => {
                present.IconImage = sprite;
            });
            present.NameText = MasterDataUtil.GetPresentName(presentMaster);
            present.NumText  = string.Format(GameTextUtil.GetText("loginbonus_amount"), MasterDataUtil.GetPresentCount(presentMaster));
            present.NumRate  = GameTextUtil.GetText("loginbonus_multipled");
            Presents.Add(present);
        }

        // 先頭のアイテムの線を非表示にする
        LoginBonusPresentListContext selectItem = Presents.First();

        if (selectItem != null)
        {
            selectItem.IsViewBorder = false;
        }


        PresentItemCount = Presents.Count;
    }
コード例 #21
0
    /// <summary>
    /// 単品受取したときのメーッセージ
    /// </summary>
    private void PresentOneOpenResultMessage(RecvPresentOpenValue result, bool isNoticeEnable)
    {
        if (result == null)
        {
            return;
        }

        string result_msg = "";
        bool   check      = false;

        //--------------------------------------------------------------
        // エラーテキストの取得
        // 1: 受け取りアイテム(ユニット)が上限に到達 2: クエストキー期限切れ 3:開封有効期限切れ
        //--------------------------------------------------------------
        if (result.error != null)
        {
            for (int i = 0; i < result.error.Length; ++i)
            {
                switch ((PRESENT_OPEN_ERROR_TYPE)result.error[i])
                {
                case PRESENT_OPEN_ERROR_TYPE.COUNT_LIMIT:
                    result_msg += Environment.NewLine + GameTextUtil.GetText("mt41q_content1");
                    break;

                case PRESENT_OPEN_ERROR_TYPE.QUEST_KEY_EXPIRED:
                    result_msg += Environment.NewLine + GameTextUtil.GetText("mt41q_content2");
                    break;

                case PRESENT_OPEN_ERROR_TYPE.RECEIVE_EXPIRED:
                    result_msg += Environment.NewLine + GameTextUtil.GetText("mt41q_content3");
                    break;
                }
            }
        }

        int presentOpenCount = (result.open_serial_id != null) ? result.open_serial_id.Length : 0; // 開封個数

        if (presentOpenCount > 0 && isNoticeEnable == false)
        {
            // 先頭に受け取りメッセージを追加
            result_msg = GameTextUtil.GetText("mt41q_content0") + Environment.NewLine + result_msg;
            check      = true;
        }
        else
        {
            // 先頭の改行を消す
            if (!result_msg.IsNullOrEmpty())
            {
                result_msg = result_msg.Remove(0, Environment.NewLine.Length);
            }
        }


        if (!result_msg.IsNullOrEmpty())
        {
            openDialog(GameTextUtil.GetText("mt40q_title"),
                       string.Format(GameTextUtil.GetText("mt41q_content"), result_msg),
                       GameTextUtil.GetText("common_button1"), check);
        }
    }
コード例 #22
0
    public void OnSelectFriend(FriendDataItem _unit)
    {
        if (!m_FixFriendUnit ||
            m_FixFriendLinkUnit)
        {
            int _index = UserDataAdmin.Instance.SearchHelperIndex(_unit.FriendData.user_id);
            if (_index == -1)
            {
                return;
            }
        }

        SoundUtil.PlaySE(SEID.SE_MENU_OK2);

        m_SelectFriend = _unit.FriendData;

        Dialog dlg = Dialog.Create(DialogType.DialogUnit);
        dlg.setUnitInfo(m_SelectFriend);
        dlg.SetDialogText(DialogTextType.Title, m_SelectFriend.user_name);
        dlg.SetDialogText(DialogTextType.SubTitle, string.Format(GameTextUtil.GetText("questfriend_text1"), m_SelectFriend.user_rank.ToString()));
        dlg.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button7");
        dlg.SetDialogEvent(DialogButtonEventType.YES, () =>
        {
            startQuest();
        });
        dlg.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button1");
        dlg.Show();
    }
コード例 #23
0
    // 購入確認ダイアログボックス表示
    private void possible(ProductsListItemContex contex)
    {
        SoundUtil.PlaySE(SEID.SE_MENU_OK);
        Dialog newDialog = Dialog.Create(DialogType.DialogYesNo).SetStrongYes();

        newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "sh126q_title");
        string mainFormat = GameTextUtil.GetText("sh126q_content1");

        newDialog.SetDialogText(DialogTextType.MainText, string.Format(mainFormat, contex.NameText, "", string.Format("{0:#,0}", contex.Price), string.Format("{0:#,0}", UnitPoint)));
        newDialog.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button4");
        newDialog.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button5");

        newDialog.SetDialogEvent(DialogButtonEventType.YES, new System.Action(() =>
        {
#if BUILD_TYPE_DEBUG
            Debug.Log("はい");
#endif
            purchase(contex);       // 購入処理
        }));
        newDialog.SetDialogEvent(DialogButtonEventType.NO, new System.Action(() =>
        {
#if BUILD_TYPE_DEBUG
            Debug.Log("いいえ");
#endif
        }));
        newDialog.Show();
    }
コード例 #24
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        if (m_FriendList == null)
        {
            m_FriendList = m_CanvasObj.GetComponentInChildren<FriendList>();
            m_FriendList.SetPositionAjustStatusBar(new Vector2(0, 26), new Vector2(-60, -422));
            m_FriendList.CheckLock = true;//お気に入りチェックON
            m_FriendList.IsViewReload = true; // 更新ボタン表示
        }
        if (m_PageTitle == null)
        {
            m_PageTitle = m_CanvasObj.GetComponentInChildren<PageTitle>();
            m_PageTitle.SetPositionAjustStatusBar(new Vector2(0, -152));
        }


        //---------------------------------------
        // フレンドポイント取得可能なクエストかどうか
        //---------------------------------------
        m_GetQuestFriendPointEnabel = MasterDataUtil.GetQuest2FriendPointEnabel(MainMenuParam.m_QuestSelectMissionID);

        setupFriend();

        //------------------------------------
        // エピソード名・ストーリー名の設定
        //------------------------------------
        m_PageTitle.Title = GameTextUtil.GetText("questfriend_title");

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.QUEST;
    }
コード例 #25
0
    protected override void PageSwitchSetting(bool initalize)
    {
        base.PageSwitchSetting(initalize);

        m_PageTitle = m_CanvasObj.GetComponentInChildren <PageTitle>();
        if (m_PageTitle != null)
        {
            m_PageTitle.Title = GameTextUtil.GetText("unit_shojititle");
            m_PageTitle.SetPositionAjustStatusBar(new Vector2(0, -152));
        }

        //ページ初期化処理
        if (m_UnitGrid == null)
        {
            //ユニットグリッド取得
            m_UnitGrid = m_CanvasObj.GetComponentInChildren <UnitGridComplex>();
            //サイズ設定
            m_UnitGrid.SetPositionAjustStatusBar(new Vector2(0, -25), new Vector2(-48, -295));

            m_UnitGrid.AttchUnitGrid <UnitGridView>(UnitGridView.Create());
        }

        updateUnitList();

        MainMenuManager.Instance.currentCategory = MAINMENU_CATEGORY.UNIT;
    }
コード例 #26
0
    private void Awake()
    {
        GetComponent <M4uContextRoot>().Context = this;

        BossIconList   = new List <BossIconContext>();
        BossSpriteList = new List <BossSpriteContext>();

        Title        = "";
        Time         = "";
        IconImage    = null;
        ElementImage = MainMenuUtil.GetElementCircleSprite(MasterDataDefineLabel.ElementType.NAUGHT);

        RewardLabel = GameTextUtil.GetText("growth_boss_10");
        RuleLabel   = GameTextUtil.GetText("growth_boss_11");
        AttrLabel   = GameTextUtil.GetText("growth_boss_12");

        IsViewSkipButton   = true;
        IsActiveSkipButton = false;
        IsActiveOkButton   = false;

        IsViewFlag = false;
        FlagImage  = null;
        FlagValue  = "";

        IsViewRewardFlag = false;

        BossPanelImage.color = new Color(1, 1, 1, 0);
    }
コード例 #27
0
    public ProductsListItemContex(
        int id,
        MasterDataPointShopProduct product,
        ListItemModel model /* TODO : 機能に関するものはListItemModelに移動 */)
    {
        // ボタンID
        Id = id;

        // 販売データ
        Product = product;

        // 商品名
        NameText = Product.product_name;

        // 販売価格 通貨単位はunity上で付与
        Price = Product.price;

        //残り時間
        if (product.timing_end > 0)
        {
            DateTime cTimeEnd   = TimeUtil.GetDateTime(product.timing_end);
            TimeSpan cCountDown = cTimeEnd - TimeManager.Instance.m_TimeNow;
            BalloonMessageText = GameTextUtil.GetRemainStr(cCountDown, GameTextUtil.GetText("general_time_02"));
        }


        // アイコン設定
        this.image(sprite => { IconImage = sprite; });

        m_model = model;
    }
コード例 #28
0
    void OpenLineUp(MasterDataStepUpGachaManage stepupgachamanage, uint assign_id)
    {
        SoundUtil.PlaySE(SEID.SE_MENU_OK);

        m_Canvas.enabled = false;

        string title = GameTextUtil.GetText("gacha_lineup_title1");

        if (stepupgachamanage.special_assign_id != 0 &&
            stepupgachamanage.special_assign_id == assign_id)
        {
            title = GameTextUtil.GetText("gacha_lineup_title2");
        }

        // タイトルにステップ数追加
        if (stepupgachamanage.step_num == 0)
        {
            // 初回ステップ
            title += GameTextUtil.GetText("gacha_lineup_step1");
        }
        else
        {
            title += string.Format(GameTextUtil.GetText("gacha_lineup_step2"), stepupgachamanage.step_num);
        }

        ScratchLineUpDialog lineupdialog = ScratchLineUpDialog.Create();

        lineupdialog.SetCamera(SceneObjReferMainMenu.Instance.m_MainMenuGroupCamera.GetComponent <Camera>());
        lineupdialog.setup(m_GachaMaster, stepupgachamanage, assign_id, true, title);
        lineupdialog.m_CloseAction = () =>
        {
            m_Canvas.enabled = true;
        };
    }
コード例 #29
0
    /// <summary>
    /// 挑戦期限の表示
    /// </summary>
    /// <returns></returns>
    public static string DiffTimeMissonLabel(DateTime date_time, DateTime now_time)
    {
        // 日付情報から残り時間を所定のフォーマットで返却する
        string result;

        // 現在時刻との差分
        TimeSpan ts = date_time.Subtract(now_time);

        // 期間内
        if (TimeSpan.Zero < ts)
        {
            if (1 <= ts.Days)
            {
                // 期間まで、残り1日(24時間)以上
                result = string.Format(GameTextUtil.GetText("common_datetime"), ts.Days);
            }
            else
            {
                // 期間まで、残り1日(24時間)未満
                result = string.Format(GameTextUtil.GetText("common_timecount"), string.Format("{0:D2}:{1:D2}", ts.Hours, ts.Minutes));
            }
        }
        else
        {
            // 期限切れ
            result = string.Format(GameTextUtil.GetText("common_timecount"), "00:00");
        }

        return(result);
    }
コード例 #30
0
ファイル: GameTextUtil.cs プロジェクト: mliuzailin/GitGame
    /// <summary>
    /// ミッションの種別受け取のフィルタ項目のテキスト取得
    /// </summary>
    /// <param name="filterType"></param>
    /// <returns></returns>
    static public string GetMissonReceiveFilterText(MasterDataDefineLabel.AchievementReceiveType filterType)
    {
        string textKey = "";

        switch (filterType)
        {
        case MasterDataDefineLabel.AchievementReceiveType.NONE:
            textKey = "filter_display_all";
            break;

        case MasterDataDefineLabel.AchievementReceiveType.UNIT:
            textKey = "filter_get_unit";
            break;

        case MasterDataDefineLabel.AchievementReceiveType.COIN:
            textKey = "filter_get_coin";
            break;

        case MasterDataDefineLabel.AchievementReceiveType.CHIP:
            textKey = "filter_get_chip";
            break;

        case MasterDataDefineLabel.AchievementReceiveType.OTHER:
            textKey = "filter_get_etc";
            break;

        default:
            break;
        }

        return(GameTextUtil.GetText(textKey));
    }