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()); } }
/// <summary> /// 本地使用技能同时通知代理 /// 绕过LogicCommand 本地执行不需要LogicCommand队列 /// </summary> /// <param name="skillData">Skill data.</param> static void UseSkill(SkillData skillData) { ObjectManager.objectManager.GetMyPlayer().GetComponent <MyAnimationEvent>().OnSkill(skillData); NetDateInterface.FastMoveAndPos(); NetDateInterface.FastUseSkill(skillData.Id); }
/// <summary> /// 和使用普通技能一样 /// </summary> public void PlayerAttack() { //连击3招 var skillId = ObjectManager.objectManager.GetMyPlayer().GetComponent <SkillInfoComponent> ().GetDefaultSkillId(); var skillData = Util.GetSkillData(skillId, 1); ObjectManager.objectManager.GetMyPlayer().GetComponent <MyAnimationEvent>().OnSkill(skillData); NetDateInterface.FastMoveAndPos(); NetDateInterface.FastUseSkill(skillId); }
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); }