当前位置: 首页>>代码示例>>C#>>正文


C# Skill.Perform方法代码示例

本文整理汇总了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;
    }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:29,代码来源:EffectFactory.cs

示例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;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:27,代码来源:EffectFactory.cs


注:本文中的Skill.Perform方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。