static void AnalyseCardData(Data inst, ArrayList list)
    {
        string[] str, str_img;
        str_img = new string[list.Count - 1];//头
        for (int x = 1; x < list.Count; x++)
        {
            //新建信息
            Card_Info info = new Card_Info();
            str            = ((string)list[x]).Split(',');
            info.id        = BKTools.ParseInt(str[(int)eCSV_Card.ID]);
            info.name      = str[(int)eCSV_Card.NAME];
            info.img       = str[(int)eCSV_Card.IMG];
            str_img[x - 1] = info.img;
            info.cost      = BKTools.ParseInt(str[(int)eCSV_Card.COST]);
            info.spd       = BKTools.ParseInt(str[(int)eCSV_Card.SPD]);
            info.mana      = BKTools.ParseInt(str[(int)eCSV_Card.MANA]);
            info.atk       = BKTools.ParseInt(str[(int)eCSV_Card.CT]);
            info.vct       = (eCard_Vocation)BKTools.ParseInt(str[(int)eCSV_Card.VCT]);
            info.rare      = BKTools.ParseInt(str[(int)eCSV_Card.RARE]);
            info.stk       = BKTools.ParseInt(str[(int)eCSV_Card.STK]);
            info.skill01   = BKTools.ParseInt(str[(int)eCSV_Card.skill01]);
            info.skill02   = BKTools.ParseInt(str[(int)eCSV_Card.skill02]);
            info.spellcard = BKTools.ParseInt(str[(int)eCSV_Card.spellcard]);

            inst.card_data.Add(info.id, info);
        }
        // 初始化需要完整的卡牌数据
        // TODO 也可能只初始化战斗中用到的可拍数据
        Card_Info.initSprite();
    }
Пример #2
0
    //初始化数据
    public void initData()
    {
        //老数据

        /*
         * int[] data = Main.Instance.card_data_main_old.data[attribute.card_id];
         * //COST SPD MANA POW VCT
         * attribute.cost = data[0];
         * attribute.spd = data[1];
         * attribute.mana = data[2];
         * attribute.max_mana = data[2];
         * attribute.pow = data[3];
         */

        //         attribute.skill = new Skill_Info();
        //         attribute.skill.id = 10001;
        //         attribute.skill.my_Type = eSkill_Type.Ritual;
        //         attribute.skill.my_Event = eSkill_Event.Ritual;
        //         attribute.skill.my_Kouka = eSkill_Kouka.DirectDamage;
        //         attribute.skill.my_TargetBelong = eSkill_TargetBelong.Opponent;
        //         attribute.skill.my_Locator = eSkill_Scope_Locator.Chess_Location;
        //         attribute.skill.my_location = new Point3(0,0,0);
        //         attribute.skill.my_Scope = new eSkill_Scope[]{eSkill_Scope.Circle};
        //         attribute.skill.my_Scope_Depth = 2;

#if UNITY_EDITOR
        if (!Data.Inst.card_data.ContainsKey(attribute.card_id))
        {
            return;
        }
#endif
        //attribute采用属性get,方面计算丢个chess的引用进去计算buff
        attribute.my_chess = this;

        Card_Info my_card_info = Data.Inst.card_data[attribute.card_id];
        attribute.base_attr = my_card_info;
        //        attribute.card_id = my_card_info.id;
        //        attribute.name = my_card_info.name;
        //        attribute.cost = my_card_info.cost;
        //        attribute.spd = my_card_info.spd;
        attribute.mana = my_card_info.mana; //单独属性 = =,直接修改,不需要复杂运算
                                            //        attribute.max_mana = my_card_info.mana;
                                            //        attribute.vocation = my_card_info.vct;
                                            //        attribute.ria = my_card_info.ria;
                                            //        attribute.stk = my_card_info.stk;
                                            //        attribute.pow = my_card_info.ct;
        if (my_card_info.skill01 != -1)
        {
            attribute.skill[0] = Data.Inst.skill_data[my_card_info.skill01];
        }
        if (my_card_info.skill02 != -1)
        {
            attribute.skill[1] = Data.Inst.skill_data[my_card_info.skill02];
        }
        if (my_card_info.spellcard != -1)
        {
            attribute.skill[2] = Data.Inst.skill_data[my_card_info.spellcard];
        }
        setHP(attribute.Max_mana);
    }
Пример #3
0
 public void next(Card_Info data)
 {
     if (data.code == 200 && !string.IsNullOrEmpty(data.data.Result))
     {
         EditText code = new EditText(this);
         code.Text = data.data.Result;
         new AlertDialog.Builder(this, 5)
         .SetTitle("提卡成功")
         .SetView(code)
         .SetCancelable(false)
         .SetNeutralButton("取消", delegate { })
         .Show();
         paydialog.Dismiss();
     }
 }
Пример #4
0
 /// <summary>
 ///     Default constructor
 /// </summary>
 /// <param name="card">The card info you're wanting related info for.</param>
 /// <param name="tagInfo">The taginfo of the card you're wanting related info for.</param>
 public RelatedCardInfo(Card_Info card, Card_Tag_Info tagInfo)
 {
     Card    = card;
     TagInfo = tagInfo;
 }