• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Aura类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AddAura

		public override void AddAura(Aura aura, bool start)
		{
			base.AddAura(aura, start);
			OnAuraAddedOrRemoved();
			if (aura.Spell.IsPassive)
			{
				if (aura.Spell.HasItemRequirements)
				{
					ItemRestrictedAuras.Add(aura);
				}
				if (aura.Spell.IsModalShapeshiftDependentAura)
				{
					ShapeshiftRestrictedAuras.Add(aura);
				}
				if (aura.Spell.RequiredCasterAuraState != 0)
				{
					AuraStateRestrictedAuras.Add(aura);
				}
			}
			if (aura.Spell.HasAuraDependentEffects)
			{
				AurasWithAuraDependentEffects.Add(aura);
			}

		}
开发者ID:MeaNone,项目名称:WCell,代码行数:25,代码来源:PlayerAuraCollection.cs


示例2: ObtainAuraRecord

		public static AuraRecord ObtainAuraRecord(Aura aura)
		{
			var record = AuraRecordPool.Obtain();
			record.SyncData(aura);

			return record;
		}
开发者ID:remixod,项目名称:netServer,代码行数:7,代码来源:AuraRecord.cs


示例3: Cancel

		protected internal override void Cancel(Aura aura)
		{
			base.Cancel(aura);
			if (aura.Spell.IsPassive && aura.Spell.HasItemRequirements)
			{
				ItemRestrictedAuras.Remove(aura);
			}
		}
开发者ID:Skizot,项目名称:WCell,代码行数:8,代码来源:PlayerAuraCollection.cs


示例4: NotifyAuraRemoved

		internal void NotifyAuraRemoved(Aura aura)
		{
			var evt = AuraRemoved;
			if (evt != null)
			{
				evt(aura);
			}
		}
开发者ID:KroneckerX,项目名称:WCell,代码行数:8,代码来源:Spell.Events.cs


示例5: AddAura

		public override void AddAura(Aura aura, bool update)
		{
			base.AddAura(aura, update);
			if (aura.Spell.IsPassive && aura.Spell.HasItemRequirements)
			{
				ItemRestrictedAuras.Add(aura);
			}
		}
开发者ID:Skizot,项目名称:WCell,代码行数:8,代码来源:PlayerAuraCollection.cs


示例6: Start

 void Start()
 {
     transform.parent = GameObject.Find ("Baddies").transform;
     Aura tempAura = transform.Find ("Aura").GetComponent<Aura>();
     tempAura.owner = gameObject;
     aura = tempAura;
     gameObject.name = "Bear " + Random.Range (0,99999);
 }
开发者ID:eiseneker,项目名称:ghost-game,代码行数:8,代码来源:ObstacleBear.cs


示例7: Remove

 protected override void Remove(bool cancelled)
 {
     if (activeToggleAura != null)
     {
         // remove aura
         activeToggleAura.Cancel();
         activeToggleAura = null;
     }
 }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:9,代码来源:ToggleAuraHandler.cs


示例8: SendAuraUpdate

		public static void SendAuraUpdate(Unit owner, Aura aura)
		{
			using (var packet = new RealmPacketOut(RealmServerOpCode.SMSG_AURA_UPDATE))
			{
				owner.EntityId.WritePacked(packet);

				WriteAura(aura, packet);

				owner.SendPacketToArea(packet);
			}
		}
开发者ID:Skizot,项目名称:WCell,代码行数:11,代码来源:AuraHandler.cs


示例9: AddAura

 public void AddAura(Aura aura)
 {
     foreach (var oldAura in Auras) {
         if (aura.Name == oldAura.Name && aura.Amount == oldAura.Amount) {
             oldAura.Duration = aura.Duration;
             return;
         }
     }
     Auras.Add(aura);
     RecalculateAttribute(aura.Attribute);
 }
开发者ID:ndssia,项目名称:Corsair3,代码行数:11,代码来源:Unit.cs


示例10: OnDebuff

		/// <summary>
		/// Called when this Unit got the given debuff by the given SpellCast
		/// </summary>
		/// <param name="cast"></param>
		internal void OnDebuff(SpellCast cast, Aura debuff)
		{
			// force combat mode
			IsInCombat = true;

			var evt = Debuff;
			if (evt != null)
			{
				evt(this, cast, debuff);
			}
		}
开发者ID:pallmall,项目名称:WCell,代码行数:15,代码来源:UnitEvents.cs


示例11: Start

	// Use this for initialization
	void Start () {
		if (target == null) {
			moveToPlayer();
		}
		
		aura = Instantiate(auraPrefab).GetComponent<Aura> ();
		aura.gameObject.transform.SetParent (this.transform);
		aura.transform.localPosition = Vector3.zero;

		setMobSizeAndSprite ();
	}
开发者ID:TammiLion,项目名称:TacoTinder,代码行数:12,代码来源:Mob.cs


示例12: MoveMe

 void MoveMe(Aura aura)
 {
     movedBy = aura;
     if(attempts < 5){
         Vector3 newPosition = owner.transform.position;
         newPosition.y = Random.Range (-2f, 2f);
         owner.transform.position = newPosition;
         attempts++;
     }else{
         Destroy (owner);
     }
 }
开发者ID:eiseneker,项目名称:ghost-game,代码行数:12,代码来源:Aura.cs


示例13: Cancel

		protected internal override void Cancel(Aura aura)
		{
			base.Cancel(aura);
			if (aura.Spell.IsPassive)
			{
				if (aura.Spell.HasItemRequirements)
				{
					ItemRestrictedAuras.Remove(aura);
				}
				if (aura.Spell.AllowedShapeshiftMask != 0)
				{
					ShapeshiftRestrictedAuras.Add(aura);
				}
			}
		}
开发者ID:ray2006,项目名称:WCell,代码行数:15,代码来源:PlayerAuraCollection.cs


示例14: AddAura

		public override void AddAura(Aura aura, bool update)
		{
			base.AddAura(aura, update);
			if (aura.Spell.IsPassive)
			{
				if (aura.Spell.HasItemRequirements)
				{
					ItemRestrictedAuras.Add(aura);
				}
				if (aura.Spell.AllowedShapeshiftMask != 0)
				{
					ShapeshiftRestrictedAuras.Add(aura);
				}
			}
		}
开发者ID:ray2006,项目名称:WCell,代码行数:15,代码来源:PlayerAuraCollection.cs


示例15: CheckValidTarget

		public override SpellFailedReason CheckValidTarget(WorldObject target)
		{
			if (Effect.Spell.RequiredTargetAuraState == AuraState.RejuvenationOrRegrowth)
			{
				// consume Reju or Regrowth and apply its full effect at once
				toConsume = ((Unit)target).Auras.FindFirst((aura) =>
				{
					return aura.Spell.IsRejuvenationOrRegrowth && toConsume.TimeLeft > 100;
				});
				if (toConsume == null)
				{
					return SpellFailedReason.TargetAurastate;
				}
			}
			return SpellFailedReason.Ok;
		}
开发者ID:WCellFR,项目名称:WCellFR,代码行数:16,代码来源:Heal.cs


示例16: SyncData

		public void SyncData(Aura aura)
		{
			OwnerId = aura.Auras.Owner.EntityId.Low;
			CasterId = (long)aura.CasterReference.EntityId.Full;
			Level = aura.Level;
			m_spell = aura.Spell;
			if (aura.HasTimeout)
			{
				MillisLeft = aura.TimeLeft;
			}
			else
			{
				MillisLeft = -1;
			}
			StackCount = aura.StackCount;
			IsBeneficial = aura.IsBeneficial;
		}
开发者ID:remixod,项目名称:netServer,代码行数:17,代码来源:AuraRecord.cs


示例17: CheckValidTarget

		public override SpellFailedReason CheckValidTarget(WorldObject target)
		{
			var caster = m_cast.Caster.CasterInfo;
			var auras = m_cast.CasterUnit.Auras;
			foreach (var aura in ((Unit)target).Auras)
			{
				// find a stealable positive auras
				if (aura.IsBeneficial && 
					aura.CanBeStolen && 
					aura.TimeLeft > 100 &&
					auras.GetAura(caster, aura.Id, aura.Spell) == null)
				{
					toSteal = aura;
					return SpellFailedReason.Ok;
				}
			}

			return SpellFailedReason.NothingToSteal;
		}
开发者ID:pallmall,项目名称:WCell,代码行数:19,代码来源:StealBeneficialBuff.cs


示例18: Apply

        protected override void Apply()
        {
            // add aura
            // first check, if Aura already exists (eg. because it was loaded from DB)
            if (ToggleAuraSpell == null)
            {
                ToggleAuraSpell = m_spellEffect.TriggerSpell;
            }

            activeToggleAura = Owner.Auras[ToggleAuraSpell];
            if (activeToggleAura == null)
            {
                activeToggleAura = Owner.Auras.CreateAndStartAura(m_aura.CasterReference, ToggleAuraSpell, true);
                activeToggleAura.CanBeSaved = false;
            }
            else
            {
                LogManager.GetCurrentClassLogger().Warn("Tried to toggle on already created Aura \"{0}\" on {1}", activeToggleAura, Owner);
                activeToggleAura.IsActivated = true;
            }
        }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:21,代码来源:ToggleAuraHandler.cs


示例19: WriteAura

        private static void WriteAura(Aura aura, BinaryWriter packet)
        {
            packet.Write(aura.Index);

            packet.Write(aura.Spell.Id);

            packet.Write((byte)aura.Flags);
            packet.Write(aura.Level);
            packet.Write((byte)aura.StackCount);

            // If the target was not the caster
            if (!aura.Flags.HasFlag(AuraFlags.TargetIsCaster))
            {
                aura.CasterReference.EntityId.WritePacked(packet);
            }

            if (aura.Flags.HasFlag(AuraFlags.HasDuration))
            {
                packet.Write(aura.Duration);
                packet.Write(aura.TimeLeft);
            }
        }
开发者ID:ebakkedahl,项目名称:WCell,代码行数:22,代码来源:AuraHandler.cs


示例20: UnTrackAura

    private void UnTrackAura(Aura aura)
    {
        if ((AuraType)aura.Type == AuraType.Buff)
        {
            _buffs.Remove(aura);
            _buffs.Sort
            (
                delegate(Aura aura1, Aura aura2)
                {
                    return ((aura1.TimeRemaining).CompareTo(aura2.TimeRemaining));
                }
            );
        }

        else
        {
            _debuffs.Remove(aura);
            _debuffs.Sort
            (
                delegate(Aura aura1, Aura aura2)
                {
                    return ((aura1.TimeRemaining).CompareTo(aura2.TimeRemaining));
                }
            );
        }
    }
开发者ID:peachesandcorn,项目名称:CMPS427,代码行数:26,代码来源:EntityAuraManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LSL_Types.LSLFloat类代码示例发布时间:2022-05-24
下一篇:
C# AuditFlags类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap