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


C# Skill.gatherTargets方法代码示例

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


在下文中一共展示了Skill.gatherTargets方法的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: 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

示例4: GetShiv

    public static Skill GetShiv()
    {
        if (shiv == null)
        {
            shiv = new Skill();
            shiv.name = "Shiv";
            shiv.icon = Resources.Load<Sprite>("SpellIcons/shiv");
            shiv.description = "Use handy dandy homemade shiv to deal a bit of damage to your target";
            shiv.basePower = 4;
            shiv.aoe = 0;
            shiv.range = 1;
            shiv.manaCost = user => 0;
            shiv.cooldown = 0;
            shiv.damageType = Skill.DamageType.DAMAGE;
            shiv.targetType = Skill.TargetType.ENEMY;
            shiv.OnTarget = (user, target, args) =>
            {
                float amt = user.DamageMultiplier * shiv.basePower * (1f - target.Armor);
                target.TakeDamage(amt,user);

            };
            shiv.GenerateTasks = (user,tile,args)=>
            {
                List<Unit> list = shiv.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_PlaySound(Resources.Load<AudioClip>("SE/Sword1")));
                    GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/ASSASSIN/SHIV/Shiv prefab"), target.transform.position, 1));
                    GameManager.instance.tasks.Add(new Task_Trigger_Animation(target,"Hit"));
                }
                shiv.EnqueueExecuteTask(user,tile,args);
            };
        }
        return shiv;
    }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:37,代码来源:SkillFactory.cs

示例5: GetRepair

 public static Skill GetRepair()
 {
     if (repair == null)
     {
         repair = new Skill();
         repair.name = "Repair";
         repair.icon = Resources.Load<Sprite>("SpellIcons/repair");
         repair.description = "restores a bit of health and increases the damage of your ally";
         repair.basePower = 2;
         repair.aoe = 0;
         repair.range = 4;
         repair.manaCost = user => 2;
         repair.cooldown = 0;
         repair.damageType = Skill.DamageType.HEAL;
         repair.targetType = Skill.TargetType.ALLY;
         repair.OnTarget = (user, target, args) =>
         {
             float amt = -user.DamageMultiplier * repair.basePower ;
             target.TakeDamage(amt,user);
             target.AddEffect(EffectFactory.getDamageMultiplierEffect(),3);
             target.AddEffect(EffectFactory.getWrenchExplosionEffect(),3);
             target.AddEffect(EffectFactory.getWrenchBuffEffect(),3);
         };
         repair.GenerateTasks = (user,tile,args)=>
         {
             List<Unit> list = repair.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_PlaySound(Resources.Load<AudioClip>("SE/Magic2")));
                 GameManager.instance.tasks.Add(new Task_Fire_Projectile(user.transform.position+Vector3.up,target.tile.transform.position+Vector3.up,(GameObject)Resources.Load("SpellVisuals/Wrench/WrenchProjectile"),2.0f));
                 //GameManager.instance.tasks.Add(new Task_Trigger_Animation(target,"Hit"));
             }
             repair.EnqueueExecuteTask(user,tile,args);
         };
     }
     return repair;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:39,代码来源:SkillFactory.cs

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

示例7: GetSnipe

    public static Skill GetSnipe()
    {
        if (snipe == null)
        {
            snipe = new Skill();
            snipe.name = "Snipe";
            snipe.icon = Resources.Load<Sprite>("SpellIcons/snipe");

            snipe.basePower = 6;
            snipe.aoe = 0;
            snipe.range = 4;
            snipe.manaCost = user => 6;
            snipe.cooldown = 0;
            snipe.damageType = Skill.DamageType.DAMAGE;
            snipe.targetType = Skill.TargetType.ENEMY;
            snipe.OnTarget = (user, target, args) =>
            {
                float amt = user.DamageMultiplier * snipe.basePower * (1f - target.Armor);
                target.TakeDamage(amt,user);

            };
            snipe.GenerateTasks = (user,tile,args)=>
            {
                List<Unit> list = snipe.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/BulletCube")));
                    GameManager.instance.tasks.Add(new Task_Trigger_Animation(target,"Hit"));
                }
                snipe.EnqueueExecuteTask(user,tile,args);
            };
        }
        return snipe;
    }
开发者ID:AndrewHarryKim,项目名称:SeanJamesMattAndrew,代码行数:36,代码来源:SkillFactory.cs

示例8: getSingledOutEffect

    public static Effect getSingledOutEffect()
    {
        if(singledOutEffect == null)
        {
            singledOutEffectHelper = new Skill();
            singledOutEffectHelper.targetType = Skill.TargetType.ALLY;
            singledOutEffectHelper.range = 0;
            singledOutEffectHelper.aoe = 3;

            singledOutEffect = new Effect();
            singledOutEffect.OnHitAttacking = (attacker, defender, amt) =>
            {
                if(singledOutEffectHelper.gatherTargets(defender,defender.tile).Count==0)
                    defender.TakeDamage(amt, attacker, true);
            };
        }
        return singledOutEffect;
    }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:18,代码来源:EffectFactory.cs

示例9: getFrontLineEffect

    public static Effect getFrontLineEffect()
    {
        if (frontLineEffect == null)
        {
            frontLineEffectHelper = new Skill();
            frontLineEffectHelper.aoe = 3;
            frontLineEffectHelper.targetType = Skill.TargetType.ENEMY;

            frontLineEffect = new Effect();
            frontLineEffect.onTurnBegin = user =>
            {
                List<Unit> others = frontLineEffectHelper.gatherTargets(user, user.tile);

                float perOther = user.maxMP * 0.03f;
                user.TakeDamage(-perOther*others.Count, user);
            };
        }
        return frontLineEffect;
    }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:19,代码来源:EffectFactory.cs

示例10: GetHeal

 public static Skill GetHeal()
 {
     if (heal == null) {
         heal = new Skill();
         heal.name = "Heal";
         heal.icon = Resources.Load<Sprite>("SpellIcons/heal");
         heal.description = "Restores some HP to one target";
         heal.basePower = 2;
         heal.aoe = 0;
         heal.range = 6;
         heal.manaCost = user => 1;
         heal.cooldown = 1;
         heal.damageType = Skill.DamageType.HEAL;
         heal.targetType = Skill.TargetType.ALLY;
         heal.OnTarget = (user, target, args) => {
             target.TakeDamage((-1*heal.basePower), user);
         };
         heal.GenerateTasks = (user, tile, args) => {
             foreach(Unit target in heal.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_Fire_Projectile(user.transform.position+Vector3.up,target.tile.transform.position+Vector3.up,(GameObject)Resources.Load("SpellVisuals/MEDIC/medic projectile prefab"), 3));
                 GameManager.instance.tasks.Add(new Task_PlaySound(Resources.Load<AudioClip>("SE/Flash3")));
                 GameManager.instance.tasks.Add(new Task_ShowParticleAnimation((GameObject)Resources.Load("SpellVisuals/MEDIC/HEAL/heal prefab"), target.transform.position + new Vector3 (0, .2f, 0), 1));
             }
             heal.EnqueueExecuteTask(user,tile,args);
         };
     }
     return heal;
 }
开发者ID:jegriffi,项目名称:SeanJamesMattAndrew,代码行数:30,代码来源:SkillFactory.cs

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

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