public void Initialize(int realIndex, RevampRecipeScrollUIModel model) { this.mRealIndex = realIndex; this.mRevampRecipeScrollUIModel = model; RevampRecipeModel model2 = this.mRevampRecipeScrollUIModel.Model; SlotitemModel_Mst slotitem = model2.Slotitem; this.mTexture_WeaponThumbnail.mainTexture = (Resources.Load("Textures/SlotItems/" + slotitem.MstId + "/2") as Texture); this.mLabel_WeaponName.text = slotitem.Name; this.mSprite_WeaponTypeIcon.spriteName = "icon_slot" + slotitem.Type4; this.mLabel_Fuel.text = model2.Fuel.ToString(); this.mLabel_Steel.text = model2.Steel.ToString(); this.mLabel_DevKit.text = model2.DevKit.ToString(); this.mLabel_Ammo.text = model2.Ammo.ToString(); this.mLabel_Bauxite.text = model2.Baux.ToString(); this.mLabel_RevampKit.text = model2.RevKit.ToString(); this.mWidgetThis.alpha = 1f; bool clickable = this.mRevampRecipeScrollUIModel.Clickable; if (clickable) { this.mSprite_ButtonState.spriteName = "btn_select"; } else { this.mSprite_ButtonState.spriteName = "btn_select_off"; } }
private void SlotItemMode() { cursol.transform.position = ItemMstID.transform.position; cursol.transform.localPosition += cursolOffset; if (keyController.IsChangeIndex) { int num = 0; if (keyController.keyState[10].down) { num = 1; } if (keyController.keyState[14].down) { num = -1; } keyController.Index = (int)Util.RangeValue(keyController.Index + num * mag - num, 1f, 150f); ItemMstID.textInt = keyController.Index; SlotitemModel_Mst slotitemModel_Mst = new SlotitemModel_Mst(keyController.Index); if (slotitemModel_Mst != null) { ItemName.text = slotitemModel_Mst.Name; } else { ItemName.text = "NONE"; } } if (keyController.keyState[1].down) { AddMstIDs.Add(keyController.Index); } if (keyController.keyState[0].down) { ChangeMode(0); debugMod.Add_SlotItem(AddMstIDs); AddMstIDs.Clear(); } }
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 + "[-]"); }
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 + "[-]"); }
public static ProdRevampReceiveItem Instantiate(ProdRevampReceiveItem prefab, Transform parent, SlotitemModel_Mst from, SlotitemModel_Mst to, int nPanelDepth, bool useJukuren, KeyControl input) { ProdRevampReceiveItem component = NGUITools.AddChild(parent.gameObject, prefab.gameObject).GetComponent <ProdRevampReceiveItem>(); component.mSlotItemFrom = from; component.mSlotItemTo = to; component._isUseJukuren = useJukuren; component._setRewardItem(); component._uiRareBG.alpha = 0f; component._uiRareBG.mainTexture = TextureFile.LoadRareBG(1); component.GetComponent <UIPanel>().depth = nPanelDepth; component._clsInput = input; component.SetJukuren(useJukuren); return(component); }