示例#1
0
        //攻击动画-
        private void PlayAttackEffect()
        {
            //处理斗转星移
            if (!HandleSkill_DZXY(1, m_SkillOwner))
            {
                return;
            }

            m_IsAttackEffectEnd = false;

            EffectBase effect = m_AttackEffect.Duplicate();

            effect.EffectEnd     += AttackEffectEndEventHandler;
            effect.EffectUpdate  += AttackEffectUpdateEventHandler;
            effect.StartPos       = effect.EndPos = m_SkillOwner.BattleCardObj.transform;
            effect.MoveSpeed      = 0f;
            effect.DirectionPoint = CalculateEffectDirection();

            effect.Play(m_SkillOwner);

            //播放攻击音效
            AudioManager.Instance.PlayEffectSound(m_SkillDisplayTab.Music, Obj_MyselfPlayer.GetMe().acceleration);
            if (Obj_MyselfPlayer.GetMe().isGuideBattle)
            {
                ShowSkillName();
            }
        }
示例#2
0
        //子弹动画-
        private void PlayProjectileEffect()
        {
            float ftime = m_SkillDisplayTab.FlyTime * 0.001f;  //除以1000

            if (ftime < 0)
            {
                Debug.LogWarning("ftime = " + ftime);
                ftime = 0.5f;
            }

            //处理斗转星移
            if (!HandleSkill_DZXY(2, null))
            {
                return;
            }

            foreach (BattleCard battle_card in m_TargetList)
            {
                EffectBase effect = m_ProjectileEffect.Duplicate();
                effect.EffectEnd     += ProjectileEffectEndEventHandler;
                effect.StartPos       = m_SkillOwner.BattleCardObj.transform;
                effect.EndPos         = battle_card.BattleCardObj.transform;
                effect.MoveSpeed      = ftime;
                effect.DirectionPoint = battle_card.BattleCardObj.transform.localPosition;

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

                effect.Play(battle_card);//播放最后调用
            }
        }
示例#3
0
        public override void UseSkill()
        {
            m_AttackEffect.EffectEnd += SkillEndEventHandler;
            m_AttackEffect.StartPos   = m_AttackEffect.EndPos = m_SkillOwner.BattleCardObj.transform;
            m_AttackEffect.MoveSpeed  = 0f;

            m_AttackEffect.Play(null);
        }
示例#4
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);
        }
示例#5
0
        //受击动画-
        private void PlayBehitEffect(BattleCard target)
        {
            EffectBase behit_effect = m_BehitEffect.Duplicate();

            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);//播放最后调用
        }
        //受击动画-
        private void PlayBehitEffect()
        {
            foreach (BattleCard battle_card in m_TargetList)
            {
                EffectBase behit_effect = m_BehitEffect.Duplicate();
                behit_effect.EffectEnd     += BehitEffectEndEventHandler;
                behit_effect.StartPos       = behit_effect.EndPos = battle_card.BattleCardObj.transform;
                behit_effect.MoveSpeed      = 0f;
                behit_effect.DirectionPoint = battle_card.BattleCardObj.transform.localPosition;//CalculateEffectDirection();

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

                behit_effect.Play(battle_card);//播放最后调用
            }
        }
示例#7
0
        //子弹动画-
        private void PlayProjectileEffect()
        {
            foreach (BattleCard battle_card in m_TargetList)
            {
                EffectBase effect = m_ProjectileEffect.Duplicate();
                effect.EffectEnd     += ProjectileEffectEndEventHandler;
                effect.EffectUpdate  += ProjectileEffectUpdateEventHandler;
                effect.StartPos       = m_SkillOwner.BattleCardObj.transform;
                effect.EndPos         = battle_card.BattleCardObj.transform;
                effect.MoveSpeed      = 0f;
                effect.DirectionPoint = battle_card.BattleCardObj.transform.localPosition;

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

                effect.Play(battle_card);//播放最后调用
            }
        }
示例#8
0
        //受击动画-
        private void PlayBehitEffect(BattleCard target)
        {
            //处理斗转星移
            if (!HandleSkill_DZXY(3, target))
            {
                return;
            }

            EffectBase behit_effect = m_BehitEffect.Duplicate();

            behit_effect.EffectEnd     += BehitEffectEndEventHandler;
            behit_effect.StartPos       = behit_effect.EndPos = target.BattleCardObj.transform;
            behit_effect.MoveSpeed      = 0f;
            behit_effect.DirectionPoint = target.BattleCardObj.transform.localPosition;//CalculateEffectDirection();

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

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