Ejemplo n.º 1
0
        private RevampValidationResult UIRevampRecipeSettingCheckDelegate(RevampRecipeDetailModel targetModel)
        {
            RevampValidationResult revampValidationResult = mRevampManager.IsValidRevamp(targetModel);

            mRevampInfoBalloon.SayMessage(LocalUtils.GenerateRevampSettingMessage(revampValidationResult, targetModel));
            return(revampValidationResult);
        }
Ejemplo n.º 2
0
        private void UpdateRevampRecipeDetail(RevampRecipeDetailModel recipeDetail)
        {
            RevampValidationResult revampValidationResult = mRevampSettingStateCheckDelegate(recipeDetail);
            List <UIButton>        list = new List <UIButton>();

            if (revampValidationResult == RevampValidationResult.OK)
            {
                mButton_Start.SetState(UIButtonColor.State.Normal, immediate: true);
                mButton_Start.isEnabled = true;
                list.Add(mButton_Cancel);
                list.Add(mButton_Switch);
                list.Add(mButton_Start);
                mButtonsFocusable = list.ToArray();
                SoundUtils.PlaySE(SEFIleInfos.SE_005);
            }
            else
            {
                mButton_Start.SetState(UIButtonColor.State.Disabled, immediate: true);
                mButton_Start.isEnabled = false;
                list.Add(mButton_Cancel);
                list.Add(mButton_Switch);
                mButtonsFocusable = list.ToArray();
                SoundUtils.PlaySE(SEFIleInfos.SE_006);
            }
            mLabel_Fuel.text      = recipeDetail.Fuel.ToString();
            mLabel_Steel.text     = recipeDetail.Steel.ToString();
            mLabel_Devkit.text    = recipeDetail.DevKit.ToString();
            mLabel_Ammo.text      = recipeDetail.Ammo.ToString();
            mLabel_Bauxite.text   = recipeDetail.Baux.ToString();
            mLabel_RevampKit.text = recipeDetail.RevKit.ToString();
        }
        public void SetLines(RevampValidationResult iResult, RevampRecipeDetailModel model)
        {
            if (model == null)
            {
                return;
            }
            string text = "[000000]";

            switch (iResult)
            {
            case RevampValidationResult.OK:
                text += string.Format("[1DBDC0]\u3000{0}[-]\nを改修しますね![-]\n\n", model.Slotitem.Name);
                text += string.Format("[000000]\u3000この改修には、無改修の\n[1DBDC0]{0}×{1}[-]\nが必要です。[-]", model.Slotitem.Name, model.RequiredSlotitemCount);
                text += string.Format("[000000]\u3000(※改修で消費します)[-]", new object[0]);
                break;

            case RevampValidationResult.Max_Level:
                text += string.Format("[FF0000]\u3000現在、選択された装備[-]\n", new object[0]);
                text += string.Format("[1DBDC0]\u3000{0}[-]\n", model.Slotitem.Name);
                text += string.Format("[FF0000]\u3000は、これ以上の改修ができません。[-]", new object[0]);
                break;

            case RevampValidationResult.Lock:
                text += string.Format("[1DBDC0]\u3000{0}[-]\nを改修しますね!\n\n", model.Slotitem.Name);
                text += string.Format("[FF0000]\u3000この装備を改修するには\n\u3000同装備のロック解除が必要です。[-]", new object[0]);
                break;

            case RevampValidationResult.Less_Fuel:
            case RevampValidationResult.Less_Ammo:
            case RevampValidationResult.Less_Steel:
            case RevampValidationResult.Less_Baux:
            case RevampValidationResult.Less_Devkit:
            case RevampValidationResult.Less_Revkit:
                text += string.Format("[FF0000]\u3000資材が足りません。", new object[0]);
                break;

            case RevampValidationResult.Less_Slotitem:
                text += string.Format("[1DBDC0]\u3000{0}[-]\nを改修しますね!\n\n", model.Slotitem.Name);
                text += string.Format("[FF0000]\u3000この改修に必要となる\n(無改修)\n[-]", new object[0]);
                text += string.Format("[1DBDC0]\u3000{0}×{1}[-]", model.Slotitem.Name, model.RequiredSlotitemCount);
                text += string.Format("[FF0000]\u3000が足りません。[-]", new object[0]);
                break;

            case RevampValidationResult.Less_Slotitem_No_Lock:
                text += string.Format("[1DBDC0]\u3000{0}[-]\nを改修しますね!\n\n", model.Slotitem.Name);
                text += string.Format("[FF0000]\u3000この改修に必要となる\n(無改修)\n[-]", new object[0]);
                text += string.Format("[1DBDC0]\u3000{0}x{1}[-]", model.Slotitem.Name, model.RequiredSlotitemCount);
                text += string.Format("[FF0000]\u3000が足りません。[-]", new object[0]);
                break;
            }
            text += "[-]";
            this._uiLines.SetLines(text);
        }
Ejemplo n.º 4
0
            public static string GenerateRevampSettingMessage(RevampValidationResult iResult, RevampRecipeDetailModel model)
            {
                if (model == null)
                {
                    return(null);
                }
                string str = "[000000]";

                switch (iResult)
                {
                case RevampValidationResult.Max_Level:
                    str += $"[FF0000]現在、選択された装備[-]\n";
                    str += $"[329ad6]{model.Slotitem.Name}[-]\n";
                    str += $"[FF0000]は、これ以上の改修ができません。[-]";
                    break;

                case RevampValidationResult.Lock:
                    str += $"[FF0000]この装備を改修するには\n\u3000同装備のロック解除が必要です。[-]";
                    break;

                case RevampValidationResult.Less_Slotitem_No_Lock:
                    str += $"[FF0000]この改修に必要となる\n(無改修)\n[-]";
                    str  = ((0 >= model.RequiredSlotitemId) ? (str + $"[329ad6]{model.Slotitem.Name}x{model.RequiredSlotitemCount}[-]") : (str + $"[329ad6]{new SlotitemModel_Mst(model.RequiredSlotitemId).Name}x{model.RequiredSlotitemCount}[-]"));
                    str += $"[FF0000]が足りません。[-]";
                    break;

                case RevampValidationResult.Less_Slotitem:
                    str += "[FF0000]この改修に必要となる\n(無改修)\n[-]";
                    str  = ((0 >= model.RequiredSlotitemId) ? (str + $"[329ad6]{model.Slotitem.Name}×{model.RequiredSlotitemCount}[-]") : (str + $"[329ad6]{new SlotitemModel_Mst(model.RequiredSlotitemId).Name}×{model.RequiredSlotitemCount}[-]"));
                    str += "\n";
                    str += "[FF0000]が足りません。[-]";
                    break;

                case RevampValidationResult.OK:
                {
                    if (model.RequiredSlotitemId == 0)
                    {
                        str += $"[329ad6]{model.Slotitem.Name}[-]\n";
                        str += $"を改修しますね![-]";
                        break;
                    }
                    SlotitemModel_Mst slotitemModel_Mst = new SlotitemModel_Mst(model.RequiredSlotitemId);
                    str += $"[329ad6]{model.Slotitem.Name}[-]\n";
                    str += $"を改修しますね![-]";
                    if (0 < model.RequiredSlotitemCount)
                    {
                        str += "\n";
                        str += "[000000]この改修には、無改修の\n";
                        str += $"[329ad6]{slotitemModel_Mst.Name}×{model.RequiredSlotitemCount}[-]";
                        str += "\n\nが必要です。[-]";
                        str += "\n[666666](※改修で消費します)[-]";
                    }
                    break;
                }

                case RevampValidationResult.Less_Fuel:
                case RevampValidationResult.Less_Ammo:
                case RevampValidationResult.Less_Steel:
                case RevampValidationResult.Less_Baux:
                case RevampValidationResult.Less_Devkit:
                case RevampValidationResult.Less_Revkit:
                    str += $"[FF0000]\u3000資材が足りません。";
                    break;
                }
                return(str + "[-]");
            }
Ejemplo n.º 5
0
            public static string GenerateRevampSettingMessage(RevampValidationResult iResult, RevampRecipeDetailModel model)
            {
                if (model == null)
                {
                    return(null);
                }
                string text = "[000000]";

                switch (iResult)
                {
                case RevampValidationResult.OK:
                    if (model.RequiredSlotitemId == 0)
                    {
                        text += string.Format("[329ad6]{0}[-]\n", model.Slotitem.Name);
                        text += string.Format("を改修しますね![-]", new object[0]);
                    }
                    else
                    {
                        SlotitemModel_Mst slotitemModel_Mst = new SlotitemModel_Mst(model.RequiredSlotitemId);
                        text += string.Format("[329ad6]{0}[-]\n", model.Slotitem.Name);
                        text += string.Format("を改修しますね![-]", new object[0]);
                        if (0 < model.RequiredSlotitemCount)
                        {
                            text += "\n";
                            text += "[000000]この改修には、無改修の\n";
                            text += string.Format("[329ad6]{0}×{1}[-]", slotitemModel_Mst.Name, model.RequiredSlotitemCount);
                            text += "\n\nが必要です。[-]";
                            text += "\n[666666](※改修で消費します)[-]";
                        }
                    }
                    break;

                case RevampValidationResult.Max_Level:
                    text += string.Format("[FF0000]現在、選択された装備[-]\n", new object[0]);
                    text += string.Format("[329ad6]{0}[-]\n", model.Slotitem.Name);
                    text += string.Format("[FF0000]は、これ以上の改修ができません。[-]", new object[0]);
                    break;

                case RevampValidationResult.Lock:
                    text += string.Format("[FF0000]この装備を改修するには\n\u3000同装備のロック解除が必要です。[-]", new object[0]);
                    break;

                case RevampValidationResult.Less_Fuel:
                case RevampValidationResult.Less_Ammo:
                case RevampValidationResult.Less_Steel:
                case RevampValidationResult.Less_Baux:
                case RevampValidationResult.Less_Devkit:
                case RevampValidationResult.Less_Revkit:
                    text += string.Format("[FF0000]\u3000資材が足りません。", new object[0]);
                    break;

                case RevampValidationResult.Less_Slotitem:
                    text += "[FF0000]この改修に必要となる\n(無改修)\n[-]";
                    if (0 < model.RequiredSlotitemId)
                    {
                        text += string.Format("[329ad6]{0}×{1}[-]", new SlotitemModel_Mst(model.RequiredSlotitemId).Name, model.RequiredSlotitemCount);
                    }
                    else
                    {
                        text += string.Format("[329ad6]{0}×{1}[-]", model.Slotitem.Name, model.RequiredSlotitemCount);
                    }
                    text += "\n";
                    text += "[FF0000]が足りません。[-]";
                    break;

                case RevampValidationResult.Less_Slotitem_No_Lock:
                    text += string.Format("[FF0000]この改修に必要となる\n(無改修)\n[-]", new object[0]);
                    if (0 < model.RequiredSlotitemId)
                    {
                        text += string.Format("[329ad6]{0}x{1}[-]", new SlotitemModel_Mst(model.RequiredSlotitemId).Name, model.RequiredSlotitemCount);
                    }
                    else
                    {
                        text += string.Format("[329ad6]{0}x{1}[-]", model.Slotitem.Name, model.RequiredSlotitemCount);
                    }
                    text += string.Format("[FF0000]が足りません。[-]", new object[0]);
                    break;
                }
                return(text + "[-]");
            }