本文整理汇总了C#中AttackPayload.AddTargets方法的典型用法代码示例。如果您正苦于以下问题:C# AttackPayload.AddTargets方法的具体用法?C# AttackPayload.AddTargets怎么用?C# AttackPayload.AddTargets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttackPayload
的用法示例。
在下文中一共展示了AttackPayload.AddTargets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
public override IEnumerable<TickTimer> Run()
{
User.PlayEffectGroup(137644);
AttackPayload attack = new AttackPayload(this);
attack.AddTargets(GetEnemiesInRadius(User.Position, ScriptFormula(1)));
attack.OnHit = (hit) =>
{
TickTimer waitBuffEnd = WaitSeconds(ScriptFormula(0));
// add main effect buff only if blind debuff took effect
if (AddBuff(hit.Target, new DebuffBlind(waitBuffEnd)))
AddBuff(hit.Target, new MainEffectBuff(waitBuffEnd));
};
attack.Apply();
yield break;
}
示例2: Run
public override IEnumerable<TickTimer> Run()
{
UsePrimaryResource(45f);
SpawnEffect(Wizard_Blizzard, TargetPosition);
const int blizzard_duration = 3;
for(int i = 0; i < blizzard_duration; ++i)
{
AttackPayload attack = new AttackPayload(this);
attack.AddTargets(GetEnemiesInRadius(TargetPosition, 18));
attack.AddWeaponDamage(0.65f, DamageType.Cold);
attack.OnHit = (hit) =>
{
AddBuff(hit.Target, new DebuffChilled(WaitSeconds(3f)));
};
attack.Apply();
yield return WaitSeconds(1f);
}
}