Example #1
0
        //处理斗转星移,如果卡牌使用斗转星移技能,目标是自己,给自己加斗转的Buff,走正常逻辑,读表,没有子弹和受击动画;
        //如果卡牌使用斗转星移技能,目标是别人,则使用特殊的表现,走非正常逻辑,bullet_dzxy,behit_dzxy
        //正常逻辑返回true,非正常逻辑返回false
        private bool HandleSkill_DZXY(int skill_step, BattleCard target)
        {
            switch (skill_step)
            {
            case 1:
                if ((m_SkillTab.Effect == 50024 || m_SkillTab.Effect == 60024) && m_TargetList.Count > 0 && m_TargetList[0] != m_SkillOwner)
                {
                    PlayProjectileEffect();
                    return(false);
                }
                break;

            case 2:
                if ((m_SkillTab.Effect == 50024 || m_SkillTab.Effect == 60024) && m_TargetList.Count > 0 && m_TargetList[0] != m_SkillOwner)
                {
                    foreach (BattleCard battle_card in m_TargetList)
                    {
                        EffectBase effect = EffectManager.Instance.CreateEffect(this, BattleEffectType.E_BATTLE_EFFECT_TYPE_PARTICLE, "bullet_dzxy", "");
                        effect.Load();
                        effect.EffectEnd     += ProjectileEffectEndEventHandler;
                        effect.StartPos       = m_SkillOwner.BattleCardObj.transform;
                        effect.EndPos         = battle_card.BattleCardObj.transform;
                        effect.MoveSpeed      = 0.5f;
                        effect.DirectionPoint = battle_card.BattleCardObj.transform.localPosition;

                        effect.Play(battle_card);    //播放最后调用
                    }
                    return(false);
                }

                break;

            case 3:
                if ((m_SkillTab.Effect == 50024 || m_SkillTab.Effect == 60024) && m_TargetList.Count > 0 && m_TargetList[0] != m_SkillOwner)
                {
                    EffectBase behit_effect = EffectManager.Instance.CreateEffect(this, BattleEffectType.E_BATTLE_EFFECT_TYPE_PARTICLE, "behit_dzxy", "");
                    behit_effect.Load();
                    behit_effect.EffectEnd     += BehitEffectEndEventHandler;
                    behit_effect.StartPos       = behit_effect.EndPos = target.BattleCardObj.transform;
                    behit_effect.MoveSpeed      = 0f;
                    behit_effect.DirectionPoint = CalculateEffectDirection();

                    target.AnimateBeHit(m_BehitMap[target]);
                    target.ShowHitValue(m_BehitMap[target], this, false);

                    behit_effect.Play(target);    //播放最后调用
                    return(false);
                }
                break;
            }

            return(true);
        }
Example #2
0
        public override bool LoadSkill()
        {
            m_AttackEffect = EffectManager.Instance.CreateEffect(this, (BattleEffectType)m_SkillDisplayTab.AttackAnimType, m_SkillDisplayTab.AttackAnim, m_SkillDisplayTab.AttackLib);

            if (!m_AttackEffect.Load())
            {
                Debug.LogError("Load attack effect error! " + m_SkillDisplayTab.AttackLib);
                return(false);
            }

            return(true);
        }