Example #1
0
    /// <summary>
    /// ダイアログ ガチャ実行
    /// </summary>
    public void openScratchDialog(int count)
    {
        Dialog newDialog = Dialog.Create(DialogType.DialogYesNo).SetStrongYes();

        newDialog.SetDialogText(DialogTextType.Title, Context.gachaMaster.name);
        string mainText = GameTextUtil.GetGachaPlayText(count, Context.gachaMaster);

        newDialog.SetDialogText(DialogTextType.MainText, mainText);
        newDialog.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button4");
        newDialog.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button5");

        newDialog.SetDialogEvent(DialogButtonEventType.YES, new System.Action(() =>
        {
            SendScratch(count);   // ガチャ(最大)9回実行
        }));
#if BUILD_TYPE_DEBUG
        newDialog.SetDialogEvent(DialogButtonEventType.NO, new System.Action(() =>
        {
            openDebugScrachDialog();
        }));
#endif
        //チップを使用するガチャのみ規約関連のボタン表示
        if (Context.gachaMaster.type == MasterDataDefineLabel.GachaType.RARE ||
            Context.gachaMaster.type == MasterDataDefineLabel.GachaType.EVENT)
        {
            newDialog.setupUnderKiyaku();
        }

        newDialog.DisableCancelButton();
        newDialog.Show();
    }