示例#1
0
        public void OnloadRuleBtn(EButton button)
        {
            List <System.Object> rules = new List <System.Object>();
            //1. 导入并且初始化规则
            //2. 细分类型-->过滤文件-->设置规则
            TextAsset textAsset = AssetDatabase.LoadAssetAtPath <TextAsset>(AssetFormatConst.RULE_ASSET_PATH);
            ResMd     resMd     = new ResMd();

            resMd.ParseText(textAsset.text);

            EdNode        ruleNode = resMd._root_node.GetNode("Rule");
            List <EdNode> nodes    = ruleNode.Nodes;
            int           length   = nodes.Count;

            for (int i = 0; i < length; i++)
            {
                EdNode          node = nodes[i];
                AssetFormatRule rule = AssetFormatRule.CreateFormatRule(node);
                if (rule != null)
                {
                    rules.Add(rule);
                }
            }

            _texRuleTablePanel.RefreshData(rules);
            _shows.Clear();
            _texShowTable.RefreshData(_shows);
        }
示例#2
0
        private BuffEffectConfig()
        {
            string text = ResManager.instance.LoadText("Config/BuffEffectConfig");

            ResMd md = new ResMd();

            md.ParseText(text);
            _rootNode = md._root_node.GetNode(ROOT);

            _changeModelConfig = new ChangeModelConfig();
            _changeModelConfig.Parse(_rootNode.GetNode(BUFF_TEMPLATE));
        }
示例#3
0
        private void Init()
        {
            _map.Clear();
            TextAsset textAsset = Resources.Load <TextAsset>("Config/Skill/02");
            ResMd     resMd     = new ResMd();

            resMd.ParseText(textAsset.text);
            List <EdNode> nodes  = resMd._root_node.GetNodes("Sequence");
            int           length = nodes.Count;

            for (int i = 0; i < length; i++)
            {
                SequenceLine line = SkillFactory.Create(nodes[i]);
                if (line == null)
                {
                    continue;
                }
                _map.Add(line.Id, line);
            }
        }