示例#1
0
        public override void Preload(ISkillCellData cellData, SkillBase skillBase)
        {
            StateParameter stateParm = new StateParameter();

            stateParm.state = ACTOR_STATE.AS_DEATH;
            CompositedSkillCellDesc tmpCellDesc = (CompositedSkillCellDesc)cellData;

            for (int i = 0; i < tmpCellDesc.SkillList.Count; ++i)
            {
                int      skillID   = tmpCellDesc.SkillList[i].SkillId;
                LuaTable skillDesc = ConfigManager.Instance.Skill.GetSkillConfig(skillID);
                if (skillDesc == null)
                {
                    continue;
                }
                SkillClassDisplayDesc skillClass = CoreEntry.gGameDBMgr.GetSkillClassDisplayDesc(skillDesc.Get <int>("skillDisplayID"));
                if (skillClass == null)
                {
                    continue;
                }
                GameObject obj          = CoreEntry.gGameObjPoolMgr.InstantiateSkillBase(skillClass.prefabPath);
                SkillBase  tmpSkillBase = obj.GetComponent <SkillBase>();
                tmpSkillBase.Preload(null, skillID);
                stateParm.skillID = skillID;
                tmpSkillBase.BreakSkill(stateParm);
            }
        }
示例#2
0
        public override void Init(ISkillCellData cellData, SkillBase skillBase)
        {
            m_skillBase = skillBase;
            cellDesc    = (CompositedSkillCellDesc)cellData;

            SkillList.Clear();
            timer = 0;

            for (int i = 0; i < cellDesc.SkillList.Count; ++i)
            {
                SkillList.Add(cellDesc.SkillList[i]);
            }
        }