Пример #1
0
        public void GetAllWingsXMLData()
        {
            dicWingsData = new Dictionary <int, WingsData>();
            if (wingUpItem == null)
            {
                wingUpItem = new Dictionary <string, uint>
                {
                    ["levelItemId"] = XMLMgr.instance.GetSXML("wings.level_item").getUint("item_id"),
                    ["stageItemId"] = XMLMgr.instance.GetSXML("wings.stage_item").getUint("item_id")
                }
            }
            ;
            List <SXML> wings = WingXML.GetNodeList("wing_stage");

            for (int i = 0; i < wings.Count; i++)
            {
                WingsData _data = new WingsData();

                _data.stage            = wings[i].getInt("stage_id");
                _data.spriteFile       = "icon_wing_" + wings[i].getString("icon");
                _data.stageCostGold    = wings[i].getUint("cost_gold");
                _data.stageCrystalMin  = wings[i].getUint("crystal_min");
                _data.stageCrystalMax  = wings[i].getUint("crystal_max");
                _data.stageCrystalStep = wings[i].getUint("crystal_step");
                _data.stageRateMin     = wings[i].getUint("rate_min");
                _data.stageRateMax     = wings[i].getUint("rate_max");
                _data.wingName         = wings[i].getString("name");

                dicWingsData[_data.stage] = _data;
            }
        }
Пример #2
0
 //获得对应阶级所需的进阶费用
 public int GetStageUpCost(int stage) => WingXML.GetNode("wing_stage", "stage_id==" + stage)?.getInt("cost_gold") ?? -1;
Пример #3
0
        //{

        //    SXML xml = GetLevelXML(stage, level);
        //    if (xml == null)
        //        return 0;

        //    uint maxExp = xml.getUint("exp");
        //    return maxExp;
        //}

        //获得升阶需要材料的数量
        public uint GetStageUpCostItemSum(int stage) => WingXML.GetNode("wing_stage", "stage_id==" + stage)?.getUint("crystal_min") ?? 0;
Пример #4
0
 //获得对应阶级的最大等级
 public int GetStageMaxLevel(int stage) => (WingXML.GetNode("wing_stage", "stage_id==" + stage)?.GetNodeList("wing_level").Count ?? 1) - 1;
Пример #5
0
 private SXML GetLevelXML(int stage, int level) => WingXML.GetNode("wing_stage", "stage_id==" + stage)?.GetNode("wing_level", "level_id==" + level);