本文整理汇总了C#中Aura类的典型用法代码示例。如果您正苦于以下问题:C# Aura类的具体用法?C# Aura怎么用?C# Aura使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Aura类属于命名空间,在下文中一共展示了Aura类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: ObtainAuraRecord
public static AuraRecord ObtainAuraRecord(Aura aura)
{
var record = AuraRecordPool.Obtain();
record.SyncData(aura);
return record;
}
示例3: Cancel
protected internal override void Cancel(Aura aura)
{
base.Cancel(aura);
if (aura.Spell.IsPassive && aura.Spell.HasItemRequirements)
{
ItemRestrictedAuras.Remove(aura);
}
}
示例4: NotifyAuraRemoved
internal void NotifyAuraRemoved(Aura aura)
{
var evt = AuraRemoved;
if (evt != null)
{
evt(aura);
}
}
示例5: AddAura
public override void AddAura(Aura aura, bool update)
{
base.AddAura(aura, update);
if (aura.Spell.IsPassive && aura.Spell.HasItemRequirements)
{
ItemRestrictedAuras.Add(aura);
}
}
示例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);
}
示例7: Remove
protected override void Remove(bool cancelled)
{
if (activeToggleAura != null)
{
// remove aura
activeToggleAura.Cancel();
activeToggleAura = null;
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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 ();
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
}
示例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;
}