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


C# Skill.EnqueueExecuteTask方法代码示例

本文整理汇总了C#中Skill.EnqueueExecuteTask方法的典型用法代码示例。如果您正苦于以下问题:C# Skill.EnqueueExecuteTask方法的具体用法?C# Skill.EnqueueExecuteTask怎么用?C# Skill.EnqueueExecuteTask使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Skill的用法示例。


在下文中一共展示了Skill.EnqueueExecuteTask方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetAoEHeal

    public static Skill GetAoEHeal()
    {
        if (aoeHeal == null) {
            aoeHeal = new Skill();
            aoeHeal.name = "AoE\nHeal";
            aoeHeal.icon = Resources.Load<Sprite>("SpellIcons/aoeHeal");

            aoeHeal.basePower = 3;
            aoeHeal.aoe = 3;
            aoeHeal.range = 4;
            aoeHeal.manaCost = user => 6;
            aoeHeal.cooldown = 2;
            aoeHeal.damageType = Skill.DamageType.HEAL;
            aoeHeal.targetType = Skill.TargetType.ALLY;
            aoeHeal.OnTarget = (user, target, args) => {
                target.TakeDamage((-1*aoeHeal.basePower), user);
            };
            aoeHeal.GenerateTasks = (user, title, args) => {
                foreach(Unit target in aoeHeal.gatherTargets (user, title)) {
                    GameManager.instance.tasks.Add(new Task_Face_Eachother(user, target));
                    GameManager.instance.tasks.Add(new Task_Trigger_Animation(user,"Punch"));
                    GameManager.instance.tasks.Add(new Task_Wait(0.3f));
                    GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position+Vector3.up,target.tile.transform.position+Vector3.up,(GameObject)Resources.Load("SpellVisuals/BulletCube")));
                    GameManager.instance.tasks.Add(new Task_Trigger_Animation(target,"Hit"));
                }
                aoeHeal.EnqueueExecuteTask(user, title, args);
            };
        }
        return aoeHeal;
    }
开发者ID:AndrewHarryKim,项目名称:SeanJamesMattAndrew,代码行数:30,代码来源:SkillFactory.cs

示例2: getAcidBlade

 public static Skill getAcidBlade()
 {
     if (acidBlade == null)
     {
         acidBlade = new Skill();
         acidBlade.name = "Acid\nBlade";
         acidBlade.icon = Resources.Load<Sprite>("SpellVisuals/ASSASSIN/ACID BLADE/acid blade");
         acidBlade.description = "Weaker than Shiv but corrodes your enemy's armor!";
         acidBlade.basePower = 3;
         acidBlade.aoe = 0;
         acidBlade.range = 1;
         acidBlade.manaCost = user => 0;
         acidBlade.cooldown = 3;
         acidBlade.damageType = Skill.DamageType.DAMAGE;
         acidBlade.targetType = Skill.TargetType.ENEMY;
         acidBlade.OnTarget = (user, target, args) =>
         {
             float amt = user.DamageMultiplier * acidBlade.basePower;
             target.TakeDamage(amt, user);
             target.AddEffect(EffectFactory.GetWeakenDefenseEffect(), 3);
         };
         acidBlade.GenerateTasks = (user, tile, args) =>
         {
             List<Unit> list = acidBlade.gatherTargets(user, tile);
                 GameManager.instance.tasks.Add(new Task_Face_Eachother(user, tile.unit));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(user, "Punch"));
                 GameManager.instance.tasks.Add(new Task_Wait(0.3f));
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Sward4")));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/shiv/shiv prefab"), tile.transform.position, 1));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(tile.unit, "Hit"));
             acidBlade.EnqueueExecuteTask(user, tile, args);
         };
     }
     return acidBlade;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:35,代码来源:SkillFactory.cs

示例3: GetTaunt

    public static Skill GetTaunt()
    {
        if (taunt == null) {
            taunt = new Skill();
            taunt.name = "Taunt";
            taunt.icon = Resources.Load<Sprite>("SpellIcons/taunt");

            taunt.basePower = 0;
            taunt.aoe = 0;
            taunt.range = 0;
            taunt.manaCost = user => 2;
            taunt.cooldown = 2;
            taunt.damageType = Skill.DamageType.CONDITIONAL;
            taunt.targetType = Skill.TargetType.NONE;
            taunt.OnTarget = (user, target, args) => {

            };
            taunt.GenerateTasks = (user, title, args) => {
                GameManager.instance.tasks.Add(new Task_Trigger_Animation(user,"Punch"));
                taunt.EnqueueExecuteTask(user, title, args);
            };
        }
        return taunt;
    }
开发者ID:AndrewHarryKim,项目名称:SeanJamesMattAndrew,代码行数:24,代码来源:SkillFactory.cs

示例4: 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

示例5: getAnatomy

 public static Skill getAnatomy()
 {
     if (anatomy == null)
     {
         anatomy = new Skill();
         anatomy.name = "Anatomy";
         anatomy.icon = Resources.Load<Sprite>("SpellIcons/fade");
         anatomy.description = "Buffs allies that increases damage and healing for 4 turns";
         anatomy.targetType = Skill.TargetType.ALLY;
         anatomy.range = 3;
         anatomy.aoe = 0;
         anatomy.manaCost = user => 3;
         anatomy.OnTarget = (user, target, args) =>
         {
             target.AddEffect(EffectFactory.getAnatomyEffect(), 3);
         };
         anatomy.GenerateTasks = (user, tile, args) =>
         {
             GameManager.instance.tasks.Add(new Task_Trigger_Animation(user, "Punch"));
             GameManager.instance.tasks.Add(new Task_Wait(0.3f));
             GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Fog1")));
             GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position + Vector3.up, tile.transform.position + Vector3.up, (GameObject)Resources.Load("SpellVisuals/MEDIC/ANATOMY/anatomy projectile prefab"), 3));
             anatomy.EnqueueExecuteTask(user, tile, args);
         };
     }
     return anatomy;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:27,代码来源:SkillFactory.cs

示例6: getStickyGrenade

 public static Skill getStickyGrenade()
 {
     if(stickyGrenade == null)
     {
         stickyGrenade = new Skill();
         stickyGrenade.name = "Sticky\nGrenade";
         stickyGrenade.icon = Resources.Load<Sprite>("SpellVisuals/TECH/GRENADE/sticky");
         stickyGrenade.description = "Give your enemy a live retro grenade so he can show his friends!";
         stickyGrenade.cooldown = 3;
         stickyGrenade.manaCost = user => 4;
         stickyGrenade.range = 3;
         stickyGrenade.targetType = Skill.TargetType.ENEMY;
         stickyGrenade.OnTarget = (user, target, args) =>
         {
             target.AddEffect(EffectFactory.getStickyGrenadeEffect(), 2);
         };
         stickyGrenade.GenerateTasks = (user, tile, args) =>
         {
             GameManager.instance.tasks.Add(new Task_Trigger_Animation(user, "Punch"));
             GameManager.instance.tasks.Add(new Task_Wait(0.3f));
             GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Earth6")));
             GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position + Vector3.up, tile.transform.position + Vector3.up, (GameObject)Resources.Load("SpellVisuals/TECH/GRENADE/german grenade projectile prefab"), 3));
             stickyGrenade.EnqueueExecuteTask(user, tile, args);
         };
     }
     return stickyGrenade;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:27,代码来源:SkillFactory.cs

示例7: GetSlam

    public static Skill GetSlam()
    {
        if(slam == null)
        {
            slam = new Skill();
            slam.name = "Slam";
            slam.icon = Resources.Load<Sprite>("SpellIcons/slam");
            slam.description = "Creates a shattering quake that damages all nearby enemies";
            slam.basePower = 4;
            slam.manaCost = user => 2;
            slam.aoe = 1;
            slam.range = 0;
            slam.cooldown = 2;
            slam.damageType = Skill.DamageType.DAMAGE;
            slam.targetType = Skill.TargetType.ENEMY;
            slam.OnTarget = (user, target, args) => {
                bool flag = user.talentTags.Contains("Slam Upgrade");

                float amt = user.DamageMultiplier * slam.basePower * (1f - target.Armor);
                target.TakeDamage(amt*(flag?2:1), user);
                target.AddEffect(EffectFactory.getStunEffect(), flag?1:2);
            };
            slam.GenerateTasks = (user, tile, args) =>
             {
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Thunder5")));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/TANK/SLAM/SlamPrefab"), user.transform.position, 4));
                 foreach(Unit target in slam.gatherTargets(user, tile))
                 {
                     GameManager.instance.tasks.Add(new Task_Trigger_Animation(target, "Hit"));
                 }
                 slam.EnqueueExecuteTask(user, tile, args);
             };
        }
        return slam;
    }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:35,代码来源:SkillFactory.cs

示例8: getShadowDrift

 public static Skill getShadowDrift()
 {
     if(shadowDrift == null)
     {
         shadowDrift = new Skill();
         shadowDrift.name = "Shadow\nDrift";
         shadowDrift.icon = Resources.Load<Sprite>("SpellVisuals/ASSASSIN/SHADOW DRIFT/shadow drift");
         shadowDrift.description = "Get out of a sticky situation or sneak behind an enemy! Also restores 15% health!";
         shadowDrift.range = 5;
         shadowDrift.targetType = Skill.TargetType.NONE;
         shadowDrift.tileRestriction = Skill.TargetTileRestriction.EMPTY;
         shadowDrift.cooldown = 3;
         shadowDrift.manaCost = user => 3;
         shadowDrift.OnTilePostEffects += (user, tile, args) =>
         {
             user.transform.position = tile.transform.position;
             GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/SHADOW DRIFT/sd arrive prefab"), tile.transform.position + Vector3.up, 2));
             shadowDrift.EnqueueWait(0.5f);
             tile.SetUnit(user);
         };
         shadowDrift.GenerateTasks = (user, tile, args) =>
         {
             //GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position + Vector3.up, tile.transform.position + Vector3.up, (GameObject)Resources.Load("SpellVisuals/ASSASSIN/SHADOW DRIFT/sd disappear prefab")));
             GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Wind10")));
             shadowDrift.EnqueueExecuteTask(user, tile, args);
         };
     }
     return shadowDrift;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:29,代码来源:SkillFactory.cs

示例9: getPierce

 public static Skill getPierce()
 {
     if (pierce == null)
     {
         pierce = new Skill();
         pierce.name = "Pierce";
         pierce.icon = Resources.Load<Sprite>("SpellVisuals/ASSASSIN/PIERCE/pierce");
         pierce.description = "Throw a daggar at your enemy that locks them on a tile for 3 turns";
         pierce.basePower = 4;
         pierce.aoe = 0;
         pierce.range = 3;
         pierce.manaCost = user => 0;
         pierce.cooldown = 0;
         pierce.damageType = Skill.DamageType.DAMAGE;
         pierce.targetType = Skill.TargetType.ENEMY;
         pierce.OnTarget = (user, target, args) =>
         {
             float amt = user.DamageMultiplier * pierce.basePower * (1f - target.Armor);
             target.TakeDamage(amt, user);
             target.AddEffect(EffectFactory.getPierceEffect(), 3);
         };
         pierce.GenerateTasks = (user, tile, args) =>
         {
             List<Unit> list = pierce.gatherTargets(user, tile);
                 GameManager.instance.tasks.Add(new Task_Face_Eachother(user, tile.unit));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(user, "Punch"));
                 GameManager.instance.tasks.Add(new Task_Wait(0.3f));
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Sword2")));
                 GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position + Vector3.up, tile.transform.position + Vector3.up, (GameObject)Resources.Load("SpellVisuals/ASSASSIN/PIERCE/pierce projectile prefab"), 3));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/SHIV/Shiv prefab"), tile.transform.position, 1));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(tile.unit, "Hit"));
             pierce.EnqueueExecuteTask(user, tile, args);
         };
     }
     return pierce;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:36,代码来源:SkillFactory.cs

示例10: GetEpidemic

 public static Skill GetEpidemic()
 {
     if (epidemic == null)
     {
         epidemic = new Skill();
         epidemic.name = "Epidemic";
         epidemic.icon = Resources.Load<Sprite>("SpellIcons/epidemic");
         epidemic.description = "Mark a target so that it explodes after 2 more turns and damages all nearby enemies";
         epidemic.basePower = 8;
         epidemic.aoe = 2;
         epidemic.range = 4;
         epidemic.manaCost = user => 6;
         epidemic.cooldown = 0;
         epidemic.damageType = Skill.DamageType.DAMAGE;
         epidemic.targetType = Skill.TargetType.ENEMY;
         epidemic.OnTarget = (user, target, args) =>
         {
             float amt = user.DamageMultiplier * epidemic.basePower * (1f - target.Armor);
             target.TakeDamage(amt, user);
             target.AddEffect(EffectFactory.getEpidemicEffect(), 2);
         };
         epidemic.GenerateTasks = (user, tile, args) =>
         {
             List<Unit> list = epidemic.gatherTargets(user, tile);
             foreach (Unit target in list)
             {
                 GameManager.instance.tasks.Add(new Task_Face_Eachother(user, target));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(user, "Punch"));
                 GameManager.instance.tasks.Add(new Task_Wait(0.3f));
                 GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position + Vector3.up, target.tile.transform.position + Vector3.up, (GameObject)Resources.Load("SpellVisuals/ASSASSIN/EPIDEMIC/epidemic projectile prefab"), 3));
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Explosion3")));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/EPIDEMIC/epidemic prefab"), target.transform.position, 2));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(target, "Hit"));
             }
             epidemic.EnqueueExecuteTask(user, tile, args);
         };
     }
     return epidemic;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:39,代码来源:SkillFactory.cs

示例11: getEfficiency

 public static Skill getEfficiency()
 {
     if(efficiency == null)
     {
         efficiency = new Skill();
         efficiency.name = "Efficiency";
         efficiency.icon = Resources.Load<Sprite>("SpellVisuals/ASSASSIN/EFFICIENCY/efficiency icon");
         efficiency.description = "Restores a bit of health to your ally or deals damage to your enemy for 5 turns! You choose!";
         efficiency.targetType = Skill.TargetType.ANY;
         efficiency.manaCost = user => 0;
         efficiency.cooldown = 3;
         efficiency.range = 2;
         efficiency.basePower = 2;
         efficiency.OnTarget = (user, target, args) =>
         {
             bool isAlly = user.IsAlly(target) ? true : false;
             if (isAlly)
             {
                 target.TakeDamage(-efficiency.basePower * user.DamageMultiplier, user);
             }
             else
             {
                 target.TakeDamage(DefaultDamageFormula(user, target, efficiency), user);
             }
             target.AddEffect(EffectFactory.getEfficiencyEffect(isAlly), 5);
             user.curMP = Mathf.Min(user.maxMP, user.curMP + 3);
         };
         efficiency.GenerateTasks = (user, tile, args) =>
         {
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(user, "Punch"));
                 GameManager.instance.tasks.Add(new Task_Wait(0.3f));
                 GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position + Vector3.up, tile.transform.position + Vector3.up, (GameObject)Resources.Load("SpellVisuals/ASSASSIN/EFFICIENCY/efficiency projectile prefab"), 3));
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Skill3")));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/EFFICIENCY/efficiency prefab"), tile.transform.position, 1));
             efficiency.EnqueueExecuteTask(user, tile, args);
         };
     }
     return efficiency;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:39,代码来源:SkillFactory.cs

示例12: GetCripple

 public static Skill GetCripple()
 {
     if (cripple == null)
     {
         cripple = new Skill();
         cripple.name = "Cripple";
         cripple.icon = Resources.Load<Sprite>("SpellIcons/cripple");
         cripple.description = "Cause your target to move only one tile for the next 3 turns";
         cripple.basePower = 1;
         cripple.aoe = 0;
         cripple.range = 4;
         cripple.manaCost = user => 3;
         cripple.cooldown = 0;
         cripple.damageType = Skill.DamageType.DAMAGE;
         cripple.targetType = Skill.TargetType.ENEMY;
         cripple.OnTarget = (user, target, args) =>
         {
             float amt = user.DamageMultiplier * cripple.basePower * (1f - target.Armor);
             target.TakeDamage(amt,user);
             target.AddEffect(EffectFactory.getCrippleEffect(), 3);
         };
         cripple.GenerateTasks = (user,tile,args)=>
         {
             List<Unit> list = cripple.gatherTargets(user,tile);
             foreach(Unit target in list){
                 GameManager.instance.tasks.Add(new Task_Face_Eachother(user, target));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(user,"Punch"));
                 GameManager.instance.tasks.Add(new Task_Wait(0.3f));
                 GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position+Vector3.up,target.tile.transform.position+Vector3.up,(GameObject)Resources.Load("SpellVisuals/ASSASSIN/CRIPPLE/cripple projectile prefab"), 3));
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Blow5")));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/CRIPPLE/cripple prefab"), target.transform.position, 1));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(target,"Hit"));
             }
             cripple.EnqueueExecuteTask(user,tile,args);
         };
     }
     return cripple;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:38,代码来源:SkillFactory.cs

示例13: GetBloodDonor

 public static Skill GetBloodDonor()
 {
     if (bloodDonor == null)
     {
         bloodDonor = new Skill();
         bloodDonor.name = "Blood\nDonor";
         bloodDonor.icon = Resources.Load<Sprite>("SpellIcons/bloodDonor");
         bloodDonor.description = "Absorbs the health of your target";
         bloodDonor.basePower = 3;
         bloodDonor.aoe = 0;
         bloodDonor.range = 4;
         bloodDonor.manaCost = user => 3;
         bloodDonor.cooldown = 3;
         bloodDonor.damageType = Skill.DamageType.DAMAGE;
         bloodDonor.targetType = Skill.TargetType.ENEMY;
         bloodDonor.OnTarget = (user, target, args) =>
         {
             float amt = user.DamageMultiplier * bloodDonor.basePower * (1f - target.Armor);
             target.TakeDamage(amt,user);
             user.TakeDamage(-amt,user);
         };
         bloodDonor.GenerateTasks = (user,tile,args)=>
         {
             List<Unit> list = bloodDonor.gatherTargets(user,tile);
             foreach(Unit target in list){
                 GameManager.instance.tasks.Add(new Task_Face_Eachother(user, target));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(user,"Punch"));
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Absorb1")));
                 GameManager.instance.tasks.Add(new Task_Fire_Projectile(target.transform.position+Vector3.up, user.tile.transform.position+Vector3.up,(GameObject)Resources.Load("SpellVisuals/MEDIC/BLOOD DONOR/blood donor prefab"), 2.5f));
                 GameManager.instance.tasks.Add(new Task_Trigger_Animation(target,"Hit"));
             }
             bloodDonor.EnqueueExecuteTask(user,tile,args);
         };
     }
     return bloodDonor;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:36,代码来源:SkillFactory.cs

示例14: GetAoEHeal

 public static Skill GetAoEHeal()
 {
     if (aoeHeal == null) {
         aoeHeal = new Skill();
         aoeHeal.name = "AoE\nHeal";
         aoeHeal.icon = Resources.Load<Sprite>("SpellIcons/aoeHeal");
         aoeHeal.description = "Creates a burst of energy that heals nearby allies";
         aoeHeal.basePower = 3;
         aoeHeal.aoe = 3;
         aoeHeal.range = 4;
         aoeHeal.manaCost = user => 6;
         aoeHeal.cooldown = 2;
         aoeHeal.damageType = Skill.DamageType.HEAL;
         aoeHeal.targetType = Skill.TargetType.ALLY;
         aoeHeal.OnTarget = (user, target, args) => {
             target.TakeDamage((-1*aoeHeal.basePower), user);
         };
         aoeHeal.GenerateTasks = (user, tile, args) => {
             GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/MEDIC/AOE HEAL/aoe healer prefab"), user.transform.position + Vector3.up, 1));
             GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Heal7")));
             foreach (Unit target in aoeHeal.gatherTargets (user, tile)) {
                 GameManager.instance.tasks.Add(new Task_Face_Eachother(user, target));
                 GameManager.instance.tasks.Add(new Task_Wait(0.3f));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/MEDIC/AOE HEAL/aoe receiver prefab"), target.transform.position + Vector3.up, 1));
             }
             aoeHeal.EnqueueExecuteTask(user, tile, args);
         };
     }
     return aoeHeal;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:30,代码来源:SkillFactory.cs

示例15: GetWeakenOffense

    public static Skill GetWeakenOffense()
    {
        if (weakenOffense == null) {
            weakenOffense = new Skill ();
            weakenOffense.name = "Weaken\nOffense";
            weakenOffense.icon = Resources.Load<Sprite> ("SpellIcons/weakenOffense");

            weakenOffense.basePower = 1;
            weakenOffense.aoe = 0;
            weakenOffense.range = 5;
            weakenOffense.manaCost = user => 1;
            weakenOffense.cooldown = 0;
            weakenOffense.damageType = Skill.DamageType.DAMAGE;
            weakenOffense.targetType = Skill.TargetType.ENEMY;
            weakenOffense.OnTarget = (user, target, args) => {
                //TODO: wait for Sean
                target.AddEffect (EffectFactory.GetWeakenOffenseEffect (), 3);
            };
            weakenOffense.GenerateTasks = (user, title, args) => {
                foreach (Unit target in weakenOffense.gatherTargets(user, title)) {
                    GameManager.instance.tasks.Add (new Task_Face_Eachother (user, target));
                    GameManager.instance.tasks.Add (new Task_Trigger_Animation (user, "Punch"));
                    GameManager.instance.tasks.Add (new Task_Wait (0.3f));
                    GameManager.instance.tasks.Add (new Task_Fire_Projectile (user.transform.position + Vector3.up, target.tile.transform.position + Vector3.up, (GameObject)Resources.Load ("SpellVisuals/BulletCube")));
                    GameManager.instance.tasks.Add (new Task_Trigger_Animation (target, "Hit"));
                }
                weakenOffense.EnqueueExecuteTask (user, title, args);
            };
        }
        return weakenOffense;
    }
开发者ID:AndrewHarryKim,项目名称:SeanJamesMattAndrew,代码行数:31,代码来源:SkillFactory.cs


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