// public void UnloadAssets () { // Resources.UnloadUnusedAssets (); // } public void ShowDetail() { // int id = SelectingCard.ID; // CardData cd = DataManager.Instance.box.Find (x => x.ID == id); CardParam cp = GetBoxCardParam(SelectingCard.ID); detailScript.Show(cp); if (cp.Count >= SystemScript.needPoint(cp)) { //強化可能 boxObjs.LevelUpText.text = "<color=#00ff00>レベルアップ</color>"; } else { //強化不可 boxObjs.LevelUpText.text = "<color=#cccccc>レベルアップ</color>"; } boxObjs.LevelUpText.text += string.Format("\n<size=18>{0}/{1}</size>", cp.Count, SystemScript.needPoint(cp)); //無効化 if (!DataManager.Instance.LVSystem) { boxObjs.LevelUpText.text = ""; } }
public static void LevelUp(int id) { var boxDat = DataManager.Instance.box; int cdnum = boxDat.FindIndex(x => x.ID == id); CardData cd = boxDat [cdnum]; int useCount = SystemScript.needPoint(new CardParam().Set(cd)); if (useCount <= cd.Count) { cd.Count -= useCount; cd.LV++; } DataManager.Instance.box [cdnum] = cd; }
public void LvUpNotify() { //無効化 if (!DataManager.Instance.LVSystem) { return; } CardParam cp = GetBoxCardParam(SelectingCard.ID); if (cp.Count >= SystemScript.needPoint(cp)) { AlertView.Make(0, "強化", string.Format(cp.Name + "\nLV.{0} → LV.{1}", cp.LV, cp.LV + 1), new string[] { "OK", "Camcel" }, gameObject, 1); } // AlertView.Make (0,"強化","カードを強化しますか",new string[]{"OK"}, gameObject,2); }