Exemplo n.º 1
0
        /// <summary>
        /// 是否技能。
        /// </summary>
        /// <param name="actor">要是否技能的角色对象。</param>
        /// <param name="skillid">技能编号。</param>
        /// <returns>是否能成功释放。</returns>
        public static bool CastSkill(ActorObj actor, int skillid)
        {
            if (!actor.CanCastSkill(skillid))
            {
                return(false);
            }

            actor.StopMove(true);
            EventParameter param = EventParameter.Get();

            param.goParameter  = actor.gameObject;
            param.intParameter = skillid;
            CoreEntry.gEventMgr.TriggerEvent(GameEvent.GE_NOTIFY_CAST_SKILL, param);

            return(true);
        }
Exemplo n.º 2
0
        public behaviac.EBTStatus CastSkill(int nSkillID)
        {
            if (!m_actor.CanCastSkill(nSkillID))
            {
                return(behaviac.EBTStatus.BT_FAILURE);
            }

            EventParameter param = EventParameter.Get();

            param.goParameter  = this.gameObject;
            param.intParameter = nSkillID; //m_actor.actorCreatureInfo.iNormalAttID;

            ActorObj actorObject = this.gameObject.GetComponent <ActorObj>();

            actorObject.StopMove(true);

            CoreEntry.gEventMgr.TriggerEvent(GameEvent.GE_NOTIFY_CAST_SKILL, param);

            return(behaviac.EBTStatus.BT_SUCCESS);
        }