Ejemplo n.º 1
0
        public static BaseBuff Create(int buffId)
        {
            TestBuffFactoryMethod.CreateData();
            BuffCnf  buffObj = StaticCnf.FindData <BuffCnf>(buffId);
            BaseBuff buff    = new BaseBuff(TestBuffFactoryMethod.info);

            return(buff);
        }
Ejemplo n.º 2
0
        private void _init_data()
        {
            //CanMovement = true;
            Id = EntityId.Get();

            _cnf = StaticCnf.FindData <HeroInfoCnf>(Template);
            _skillSet.OnReset(Template);
            _attrProp = new EntityAttributeProperty(Id);
        }
Ejemplo n.º 3
0
        public void OnReset(int hero_id)
        {
            _sequence_map.Clear();

            // 初始化技能列表
            HeroInfoCnf hero_cnf = StaticCnf.FindData <HeroInfoCnf>(hero_id);

            int[] skill_list = hero_cnf.skillid_list;
            int   length     = skill_list.Length;
            int   skill_type_normal_attack = (int)E_SkillType.normal;


            for (int i = 0; i < length; i++)
            {
                if (skill_list[i] == 0)
                {
                    continue;
                }
                // 确定普通攻击
                SpellInfoCnf space_info = StaticCnf.FindData <SpellInfoCnf>(skill_list[i]);
                if (space_info.skill_types == skill_type_normal_attack)
                {
                    normal_attack.AddSkill(skill_list[i]);
                }

                /*SkillFactory skill = null;
                 * //
                 * if (space_info.process_template == "normal")
                 * {
                 *  skill = new SkillSequenceNormal();
                 * }
                 * else if (space_info.process_template == "born")
                 * {
                 *  skill = new SkillZhaoYunBorn();
                 * }
                 * else if (space_info.process_template == "qianchong")
                 * {
                 *  skill = new SkillZhaoYunQianChong();
                 * }
                 * else if (space_info.process_template == "tiaokong")
                 * {
                 *  skill = new SkillZhaoYunTiao();
                 * }
                 * if (skill == null) continue;
                 * _sequence_map.Add(skill_list[i], skill.Create(this, space_info));*/

                //_sequence_map.Add(skill_list[i], SkillFactory.Create());
            }

            _can_cast_skill = true;
        }