예제 #1
0
        void Start()
        {
            if (Event.attaches)
            {
                StartCoroutine(FollowAttacker());
            }

            if (Event.affix.effectType != Affix.EffectType.None && Event.affix.target == Affix.TargetType.Self)
            {
                if (stateMachine.attacker != null && stateMachine.attacker.GetComponent <NpcAttribute>().IsMine())
                {
                    stateMachine.attacker.GetComponent <BuffComponent>().AddBuff(Event.affix);
                    NetDateInterface.FastMoveAndPos();
                    NetDateInterface.FastAddBuff(Event.affix, stateMachine.attacker, stateMachine.attacker, stateMachine.skillFullData.skillId, Event.EvtId);
                }
            }


            var skillConfig = Event.layout.GetComponent <SkillLayoutConfig>();

            if (skillConfig != null)
            {
                StartCoroutine(ShowParticle());
            }
        }
예제 #2
0
 public void DoDamage(GameObject g)
 {
     Log.AI("SkillLayout DoDamage " + Event.affix.effectType);
     if (Event.affix.effectType != Affix.EffectType.None && Event.affix.target == Affix.TargetType.Enemy)
     {
         //Buff目标是本地控制
         //通过ID来控制复制信息 实体都要有ID才便于复制
         //if(stateMachine.attacker.GetComponent<NpcAttribute>().IsMine()) {
         if (g.GetComponent <NpcAttribute>().IsMine())
         {
             g.GetComponent <BuffComponent>().AddBuff(Event.affix, stateMachine.attacker.transform.position);
             NetDateInterface.FastMoveAndPos();
             NetDateInterface.FastAddBuff(Event.affix, stateMachine.attacker, g, stateMachine.skillFullData.skillId, Event.EvtId);
         }
     }
     stateMachine.DoDamage(g);
 }