protected override void OnExecute(InteractiveObj self, InteractiveObj target) { target.DoDamage(new Damage(EffectType, self.CalAtkDamage(EffectBaseValue)), self); EffectPlayer.PlayOnTransform(EffectFX, target.BeAtkPoint); AudioSystem.Instance.PlayOnTransform(EffectSE, target.BeAtkPoint); Debuff_Dot dot = new Debuff_Dot(); dot.Init(nBuffOrder, nDuration, BuffBase.Type.Debuff, self, target); dot.InitDot(nFirstEffectTime, nDuration, EffectType, self.CalAtkDamage(nEffectDamage), self.CalAtkDamage(nEndDamage)); dot.InitDotResources(objContinueFX, acContinueSE, objContinueEffectFX, acContinueEffectSE, objEndEffectFX, acEndEffectSE); target.AddBuff(dot); }
protected override void OnExecute(InteractiveObj self, Vector3 pos) { foreach (var target in BattleManager.Instance.dicInteractiveObjs.Values) { if (target && self.IsEnemy(target.Camp) && Common.IsPosInConeRange(self.transform, pos, Angle, MaxRange, MinRange)) { target.DoDamage(new Damage(EffectType, self.CalAtkDamage(EffectBaseValue)), self); } } }
protected override void OnExecute(InteractiveObj self, Vector3 pos) { RaycastHit[] hits = Physics.SphereCastAll(pos, Range, Vector3.up, float.MaxValue, layerEnemey); for (int i = 0, length = hits.Length; i < length; ++i) { InteractiveObj target = hits[i].collider.GetComponent <InteractiveObj>(); if (target && self.IsEnemy(target.Camp)) { target.DoDamage(new Damage(EffectType, self.CalAtkDamage(EffectBaseValue)), self); } } }
protected virtual void OnExecute(InteractiveObj self, InteractiveObj target) { target.DoDamage(new Damage(EffectType, self.CalAtkDamage(EffectBaseValue)), self); }