Exemple #1
0
        public void BreakSkill(StateParameter stateParm)
        {
            CancelInvoke("StartEndure");
            EndEndure();

            CancelInvoke("AutoCastNextSkill");
            CancelInvoke("SkillCastEnd");

            CancelInvoke("SkillSetAfterAttack");
            CancelInvoke("EndSkillAfterAttack");

            m_curSkillID   = 0;
            m_bAfterAttack = false;

            //技能结束时间
            m_lastestEndTime = Time.time;

            //如果非正常结束
            if (m_curSkillBase != null && m_curSkillBase.CanBeBroke)
            {
                m_curSkillBase.BreakSkill(stateParm);
                m_curSkillBase = null;
            }

            // 删除预警贴花
            if (m_actor != null && m_actor.m_WarningefxObj != null)
            {
                Destroy(m_actor.m_WarningefxObj);
                m_actor.m_WarningefxObj = null;
            }
        }
Exemple #2
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);
            }
        }
Exemple #3
0
        private void PreLoadSkill(int skillID)
        {
            StateParameter sp = new StateParameter();

            sp.state = ACTOR_STATE.AS_DEATH;
            GameObject obj = CoreEntry.gGameObjPoolMgr.InstantiateSkillBase("Skill/SkillBase");

            if (null != obj)
            {
                SkillBase skillBase = obj.GetComponent <SkillBase>();
                skillBase.Preload(null, skillID);
                sp.skillID = skillID;
                skillBase.BreakSkill(sp);
            }
        }