public void Show(CardParam cp) { NameAndGroup.text = cp.Name + string.Format(":LV.{0}", cp.LV); if (cp.Groups.Count > 0) { NameAndGroup.text += "\n<size=18>" + SystemScript.GetGroup(cp.Groups) + "</size>"; } Param.text = System.String.Format ("{0}\n役割:{1}\nコスト:{2}\nパワー:{3}" , new string[] { SystemScript.GetReality(cp.Rea, true), SystemScript.GetRole(cp.Role), cp.Cost.ToString(), cp.Power.ToString() }); SkillText.text = SystemScript.GetSkillsText(cp, SystemScript.ShowType.DETAIL, true); CardImg.gameObject.SetActive(true); CardImg.Set(cp); }
public void Refresh(CardParam _param, bool _DeckMode) { // DeckInCount = DataManager.Deck.GetCard(DataManager.Instance.UseDeck,_param.Atr,_param.ID).Count; // BoxCount = DataManager.Box.GetCard(_param.Atr,_param.ID).Count; //名前+種族 string Title = System.String.Format ("LV.{0} {1} ", new string[] { _param.LV.ToString(), _param.Name.ToString() }); if (_param.Groups.Count > 0) { Title += "\n<size=25>" + SystemScript.GetGroup(_param.Groups) + "</size>"; } Name.text = Title; //パラメータ Param.text = System.String.Format ("{0}\n役割:{1}\nコスト:{2}\nパワー:{3}" , new string[] { SystemScript.GetReality(_param.Rea, true), SystemScript.GetRole(_param.Role), _param.Cost.ToString(), _param.Power.ToString() }); // Skill.text = SystemScript.GetSkillsText(_param, SystemScript.ShowType.DETAIL, true); //LVUP関連 // LvUpText.text = System.String.Format ("LV.{0}→LV.{1}\n{2} / {3}枚",new string[]{_param.LV.ToString(),(_param.LV+1).ToString(),BoxCount.ToString(),999.ToString()}); LvUpText.text = "強化"; //イメージ変更 CardImage.Set(_param); CardBigImage.Set(_param); //ボタン変更 for (int i = 0; i < Buttons.Length; i++) { GameObject btn = Buttons [i]; if (i == DeckInCount) { btn.GetComponent <ShadowMove> ().Move(true, false); } else { btn.GetComponent <ShadowMove> ().Move(false, false); } } // Param.text = _param. }
//購入後処理 public void OnBuy(List <object> cid, string errmsg) { //アラートを消す alert.OpenClose(false); if (cid == null || cid.Count == 0) { //エラー alert = AlertView.Make(-1, "エラー", errmsg, new string[] { "確認" }, gameObject, 1); } else { //成功 //カード追加 lcd = new List <CardData>(); for (int i = 0; i < cid.Count; i++) { int id = toInt(cid [i]); DataManager.Box.AddCard(0, id, 1); lcd.Add(new CardData().Set(0, id, 1, 1)); } //ポイント消費 DataManager.ChangePoint(useType, -usePoint); DataManager.Instance.RefreshData(); DataManager.Instance.Save(); var paramDatas = DataManager.Instance.xls_CardParam; List <string> datas = new List <string>(); for (int i = 0; i < lcd.Count; i++) { CardData cd = lcd [i]; var param = DataManager.Instance.xls_CardParam.sheets [cd.Atr].list [cd.ID]; datas.Add(SystemScript.GetReality(param.reality, true) + " " + param.name); } AlertView.Make(-1, "入手カード", "パックを購入しました", datas.ToArray(), gameObject, 1); } }