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


C# SpellEffect类代码示例

本文整理汇总了C#中SpellEffect的典型用法代码示例。如果您正苦于以下问题:C# SpellEffect类的具体用法?C# SpellEffect怎么用?C# SpellEffect使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: SummonEffectHandler

		public SummonEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
			// MiscValueB:
			// 41 -> NonCombat Companion
			// 
		}
开发者ID:NVN,项目名称:WCell,代码行数:7,代码来源:Summon.cs

示例2: NotImplementedEffect

		public NotImplementedEffect(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
			if (cast.Caster is Character)
			{
				(cast.Caster as Character).SendSystemMessage(
					"Spell {0} ({1}) has not implemented Effect {2}. Please report this to the developers",
					cast.Spell.Name, cast.Spell.Id, effect.EffectType);
			}
		}
开发者ID:ray2006,项目名称:WCell,代码行数:10,代码来源:NotImplementedEffect.cs

示例3: Equals

 //Use this to check whether an effect is already on someone, then just refresh the duration if it is
 public bool Equals(SpellEffect otherEffect)
 {
     if (instantDamage == otherEffect.instantDamage && instantKnockback == otherEffect.instantKnockback && maxHealthMod == otherEffect.maxHealthMod
         && healthRegenMod == otherEffect.healthRegenMod && damageReductionMod == otherEffect.damageReductionMod && maxManaMod == otherEffect.maxManaMod
         && manaRegenMod == otherEffect.manaRegenMod && damageMod == otherEffect.damageMod && attackTimeMod == otherEffect.attackTimeMod
         && knockbackMod == otherEffect.knockbackMod && speedMod == otherEffect.speedMod && jumpSpeedMod == otherEffect.jumpSpeedMod)
     {
         //All the effects are equal
         return true;
     } else {
         //One or more effects is not equal
         return false;
     }
 }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:15,代码来源:SpellEffect.cs

示例4: EquipEvent

 public override bool EquipEvent(int slotNo)
 {
     if ((slotNo ==9) || (slotNo ==10))
     {
         if (objInt().isEnchanted==true)
         {
             //cast enchantment.
             SpellEffectApplied = GameWorldController.instance.playerUW.PlayerMagic.CastEnchantment(GameWorldController.instance.playerUW.gameObject,null,GetActualSpellIndex(),Magic.SpellRule_TargetSelf);
             if (SpellEffectApplied!=null)
             {
                 SpellEffectApplied.SetPermanent(true);
             }
         }
     }
     return true;
 }
开发者ID:hankmorgan,项目名称:UnderworldExporter,代码行数:16,代码来源:Ring.cs

示例5: SetSpellEffect

    public void SetSpellEffect(Spell newSpell)
    {
        effect = new SpellEffect (newSpell.effect);
        targetsEnemies = newSpell.targetsEnemies;
        AoE = newSpell.AoE;
        rb.useGravity = newSpell.affectedByGravity;
        radius = newSpell.radius;
        deathTimer = newSpell.lifetime;

        GetComponent<SphereCollider> ().radius = newSpell.size;

        if (transform.Find ("Trail") && transform.Find ("Explosion")) {
            transform.Find ("Trail").GetComponent<ParticleSystem> ().startSize *= newSpell.size;
            transform.Find ("Trail").GetComponent<ParticleSystem> ().startColor = newSpell.col;
            transform.Find ("Explosion").GetComponent<ParticleSystem> ().startColor = newSpell.col;
        }
    }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:17,代码来源:ProjectileSpell.cs

示例6: SpellEffect

    //For creating spells from templates -- necessary because when I tried
    //setting ProjectileSpell's effect field equal to the template effect,
    //it was a reference instead of a variable
    public SpellEffect(SpellEffect templateEffect)
    {
        instantDamage = templateEffect.instantDamage;
        instantKnockback = templateEffect.instantKnockback;

        maxHealthMod = templateEffect.maxHealthMod;
        healthRegenMod = templateEffect.healthRegenMod;
        damageReductionMod = templateEffect.damageReductionMod;
        maxManaMod = templateEffect.maxManaMod;
        damageMod = templateEffect.damageMod;
        attackTimeMod = templateEffect.attackTimeMod;
        knockbackMod = templateEffect.knockbackMod;
        speedMod = templateEffect.speedMod;
        jumpSpeedMod = templateEffect.jumpSpeedMod;

        duration = templateEffect.duration;
    }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:20,代码来源:SpellEffect.cs

示例7: EquipEvent

    public override bool EquipEvent(int slotNo)
    {
        if (((slotNo ==7) && (GameWorldController.instance.playerUW.isLefty==true)) || ((slotNo ==8) && (GameWorldController.instance.playerUW.isLefty==false)))//Only on off hand
        {
            UpdateQuality();
            if (objInt().isEnchanted==true)
            {
                int EffectId=GetActualSpellIndex ();
                switch (EffectId)
                {
                case SpellEffect.UW1_Spell_Effect_MinorProtection:
                case SpellEffect.UW1_Spell_Effect_Protection:
                case SpellEffect.UW1_Spell_Effect_AdditionalProtection:
                case SpellEffect.UW1_Spell_Effect_MajorProtection:
                case SpellEffect.UW1_Spell_Effect_GreatProtection:
                case SpellEffect.UW1_Spell_Effect_VeryGreatProtection:
                case SpellEffect.UW1_Spell_Effect_TremendousProtection:
                case SpellEffect.UW1_Spell_Effect_UnsurpassedProtection:
                    ProtectionBonus=EffectId-463;
                    break;
                case SpellEffect.UW1_Spell_Effect_MinorToughness:
                case SpellEffect.UW1_Spell_Effect_Toughness:
                case SpellEffect.UW1_Spell_Effect_AdditionalToughness:
                case SpellEffect.UW1_Spell_Effect_MajorToughness:
                case SpellEffect.UW1_Spell_Effect_GreatToughness:
                case SpellEffect.UW1_Spell_Effect_VeryGreatToughness:
                case SpellEffect.UW1_Spell_Effect_TremendousToughness:
                case SpellEffect.UW1_Spell_Effect_UnsurpassedToughness:
                    ToughnessBonus=EffectId-471;
                    break;

                default:
                    //cast enchantment.
                    SpellEffectApplied = GameWorldController.instance.playerUW.PlayerMagic.CastEnchantment(GameWorldController.instance.playerUW.gameObject,null,GetActualSpellIndex(),Magic.SpellRule_TargetSelf);
                    if (SpellEffectApplied!=null)
                    {
                        SpellEffectApplied.SetPermanent(true);
                    }
                    break;
                }
            }
        }
        return true;
    }
开发者ID:hankmorgan,项目名称:UnderworldExporter,代码行数:44,代码来源:Shield.cs

示例8: AddEffect

    public void AddEffect(SpellEffect newEffect)
    {
        //If you already have the effect, just refresh the timer
        bool hasEffect = false;
        for (int i = 0; i < effects.Count; i++) {
            if (effects [i].Equals (newEffect)) {
                hasEffect = true;
                effects [i].SetDuration (newEffect.duration);
            }
        }
        //If not, add the effect
        if (!hasEffect) {
            effects.Add (newEffect);
        }

        //Do damage regardless
        healthmana.ModHealth (-1 * newEffect.instantDamage);
        //Knockback is applied within the "projectile spell" code
    }
开发者ID:type1ninja,项目名称:Dwarfnarok,代码行数:19,代码来源:CharacterEffects.cs

示例9: DisenchantEffectHandler

		public DisenchantEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:Disenchant.cs

示例10: AddExtraAttacksEffectHandler

		public AddExtraAttacksEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:4,代码来源:AddExtraAttacks.cs

示例11: MillingEffectHandler

		public MillingEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:ray2006,项目名称:WCell,代码行数:4,代码来源:Milling.cs

示例12: SummonObjectEffectHandler

		public SummonObjectEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:remixod,项目名称:netServer,代码行数:4,代码来源:SummonObject.cs

示例13: ForgetSpecializationEffectHandler

		public ForgetSpecializationEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:remixod,项目名称:netServer,代码行数:4,代码来源:ForgetSpecialization.cs

示例14: CannibalizeEffectHandler

		public CannibalizeEffectHandler(SpellCast cast, SpellEffect effect)
			: base(cast, effect)
		{
		}
开发者ID:ray2006,项目名称:WCell,代码行数:4,代码来源:Cannibalize.cs

示例15: OnEquip

        public override bool OnEquip(Mobile from)
        {
            if ( base.OnEquip(from) )
            {
                if ( SpellEffectOnEquip && from.Alive && !from.Deleted && m_Effect != SpellEffect.None && SpellCharges > 0 )
                {
                    if ( SpellCastEffect.InvokeEffect( m_Effect, from, from ) )
                    {
                        SpellCharges--;
                        if ( SpellCharges <= 0 )
                        {
                            if ( m_Timer != null )
                            {
                                m_Timer.Stop();
                                m_Timer = null;
                            }

                            m_Effect = SpellEffect.None;
                            from.SendAsciiMessage( "This magic item is out of charges." );
                        }
                    }

                    if ( SpellCharges > 0 && SpellCastEffect.IsRepeatingEffect( m_Effect ) )
                    {
                        if ( m_Timer == null )
                            m_Timer = new CheckTimer( this );
                        if ( !m_Timer.Running )
                            m_Timer.Start();
                    }
                }

                return true;
            }
            else
            {
                return false;
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:38,代码来源:BaseClothing.cs


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