Пример #1
0
        public override bool Execute(object sender, SkillInstance instance, long delta, long curSectionTime)
        {
            if (curSectionTime < m_StartTime)
            {
                return(true);
            }
            UnityEngine.GameObject obj = sender as UnityEngine.GameObject;
            if (obj == null)
            {
                return(false);
            }
            MoveTargetInfo target_info = instance.CustomDatas.GetData <MoveTargetInfo>();

            if (target_info == null)
            {
                return(false);
            }
            UnityEngine.GameObject target_obj = target_info.Target;
            if (target_obj == null)
            {
                return(false);
            }
            LogicSystem.NotifyGfxHitTarget(obj, m_ImpactId, target_obj, 0, instance.SkillId,
                                           (int)m_RemainTime, obj.transform.position,
                                           TriggerUtil.GetObjFaceDir(obj), 0);
            return(false);
        }
Пример #2
0
        public void SendImpactToObject(GameObject source, GameObject target, int impactid, int remaintime, int skillid, long hit_count_id)
        {
            if (IsUserStandUp(target))
            {
                return;
            }
            int        final_skill_id = skillid;
            GameObject damageOwner    = TriggerUtil.GetFinalOwner(source, skillid, out final_skill_id);

            LogicSystem.NotifyGfxHitTarget(damageOwner, impactid, target, 1, final_skill_id,
                                           remaintime, source.transform.position,
                                           TriggerUtil.GetObjFaceDir(source), hit_count_id);
        }
Пример #3
0
        public void SendImpactToObject(GameObject source, GameObject target, Dictionary <BeHitState, StateImpact> stateimpacts, int skillid, long hit_count_id)
        {
            if (stateimpacts == null)
            {
                return;
            }
            if (IsUserStandUp(target))
            {
                return;
            }
            BeHitState  state       = GetBeHitState(target);
            StateImpact stateimpact = null;

            if (!stateimpacts.TryGetValue(state, out stateimpact))
            {
                stateimpacts.TryGetValue(BeHitState.kDefault, out stateimpact);
            }
            if (stateimpact == null)
            {
                return;
            }
            int        final_skill_id = -1;
            GameObject damageOwner    = TriggerUtil.GetFinalOwner(source, skillid, out final_skill_id);

            //Debug.Log("------------send impact to object " + target.name);
            for (int i = 0; i < stateimpact.m_Impacts.Count; i++)
            {
                LogicSystem.NotifyGfxHitTarget(damageOwner, stateimpact.m_Impacts[i].ImpactId, target, 1, final_skill_id,
                                               stateimpact.m_Impacts[i].RemainTime, source.transform.position,
                                               TriggerUtil.GetObjFaceDir(source), hit_count_id);
            }

            /*
             * foreach (ImpactData im in stateimpact.m_Impacts) {
             * LogicSystem.NotifyGfxHitTarget(damageOwner, im.ImpactId, target, 1, final_skill_id,
             *                                        im.RemainTime, source.transform.position,
             *                                        TriggerUtil.GetObjFaceDir(source), hit_count_id);
             * }*/
        }