本文整理汇总了C#中Skill.Perform方法的典型用法代码示例。如果您正苦于以下问题:C# Skill.Perform方法的具体用法?C# Skill.Perform怎么用?C# Skill.Perform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skill
的用法示例。
在下文中一共展示了Skill.Perform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: getStickyGrenadeEffect
public static Effect getStickyGrenadeEffect()
{
if(stickyGrenadeEffect == null)
{
stickyGrenadeEffectHelper = new Skill();
stickyGrenadeEffectHelper.targetType = Skill.TargetType.ALLY;
stickyGrenadeEffectHelper.range = 0;
stickyGrenadeEffectHelper.aoe = 2;
stickyGrenadeEffectHelper.basePower = 2;
stickyGrenadeEffectHelper.OnTarget = (user, target, args) =>
{
float amt = stickyGrenadeEffectHelper.basePower * (1f - target.Armor);
target.TakeDamage(amt, user);
};
stickyGrenadeEffectHelper.GenerateTasks = (user, tile, args) =>
{
GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/TECH/GRENADE/sticky grenade explosion prefab"), user.transform.position, 1));
stickyGrenadeEffectHelper.EnqueueExecuteTask(user, tile, args);
};
stickyGrenadeEffect = new Effect();
stickyGrenadeEffect.particlePrefab = Resources.Load<GameObject>("SpellVisuals/TECH/GRENADE/stuck sticky prefab");
stickyGrenadeEffect.OnExit = user =>
{
stickyGrenadeEffectHelper.Perform(user, user.tile);
};
}
return stickyGrenadeEffect;
}
示例2: getEpidemicEffect
public static Effect getEpidemicEffect()
{
if (epidemicEffect == null)
{
epidemicEffectHelper = new Skill();
epidemicEffectHelper.targetType = Skill.TargetType.ALLY;
epidemicEffectHelper.range = 0;
epidemicEffectHelper.aoe = 3;
epidemicEffectHelper.basePower = 8;
epidemicEffectHelper.OnTarget = (user, target, args) =>
{
float amt = epidemicEffectHelper.basePower * (1f - target.Armor);
target.TakeDamage(amt, user);
};
epidemicEffectHelper.GenerateTasks = (user, tile, args) =>
{
GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/EPIDEMIC/epidemic prefab"), user.transform.position, 2));
epidemicEffectHelper.EnqueueExecuteTask(user, tile, args);
};
epidemicEffect = new Effect();
epidemicEffect.OnExit = user =>
{
epidemicEffectHelper.Perform(user, user.tile);
};
}
return epidemicEffect;
}