本文整理汇总了C#中IBlob类的典型用法代码示例。如果您正苦于以下问题:C# IBlob类的具体用法?C# IBlob怎么用?C# IBlob使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IBlob类属于命名空间,在下文中一共展示了IBlob类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Attack
public List<IBlob> Attack(List<IBlob> blobs, string attacker, string defender)
{
int attackerIndex = 0;
int defenderIndex = 0;
for (int i = 0; i < blobs.Count; i++)
{
if (blobs[i].Name == attacker)
{
attackerIndex = i;
}
if (blobs[i].Name == defender)
{
defenderIndex = i;
}
}
if (blobs[attackerIndex].Attack == "PutridFart")
{
blobs[defenderIndex] = attaks.PutridFart(blobs[attackerIndex], blobs[defenderIndex]);
}
else if (blobs[attackerIndex].Attack == "Blobplode")
{
IBlob[] blobArray = new IBlob[2];
blobArray = attaks.Blobplode(blobs[attackerIndex], blobs[defenderIndex]);
blobs[attackerIndex] = blobArray[0];
blobs[defenderIndex] = blobArray[1];
}
return blobs;
}
示例2: ToggledEffect
public override void ToggledEffect(IBlob blob)
{
if (this.HasTriggered)
{
blob.Health -= 10;
}
}
示例3: Behave
public void Behave(IBlob blob)
{
if (blob.Damage - 5 >= this.initialDamage)
{
blob.Damage -= 5;
}
}
示例4: Blob
internal Blob(IBlob blob)
{
if(blob.Id != Guid.Empty)
Id = blob.Id;
OwnerUserId = blob.OwnerUserId;
}
示例5: FireEvent
protected void FireEvent(IBlob parent)
{
if (this.HasTriggered != null)
{
this.HasTriggered(parent);
}
}
示例6: ValidateHelth
public static void ValidateHelth(IBlob blob)
{
if (blob.Health < 0)
{
blob.Health = 0;
}
}
示例7: DummyOutputNeutralPort
/// <summary>
/// Testing constructor Only
/// </summary>
/// <param name="parent"></param>
/// <param name="inPipe"></param>
/// <param name="dataObj"></param>
/// <param name="isValid"></param>
public DummyOutputNeutralPort(IElement parent, INeutralPipe inPipe, IBlob dataObj, bool isValid)
{
_parent = parent;
_inPipe = inPipe;
_dataObj = dataObj;
_IsValid = isValid;
}
示例8: ApplyBehaviorTurn
public override void ApplyBehaviorTurn(IBlob blob)
{
if (blob.InitialDamage <= blob.Damage - DefaultAggressiveBehaviorDamageTurnSubtraction)
{
blob.Damage -= DefaultAggressiveBehaviorDamageTurnSubtraction;
}
}
示例9: Blob
public Blob(IBlob blob)
: this(blob.Md5, Guid.NewGuid().ToString())
{
Metdata = new List<KeyValuePair<string, string>>(blob.Metdata);
Content = blob.Content;
ContentType = blob.ContentType;
}
示例10: ApplyHealthEffect
protected override void ApplyHealthEffect(IBlob blob)
{
if (blob.Health/2 >= 1)
{
blob.Health /= 2;
}
else blob.Health = 1;
}
示例11: InsertAsync
public async Task InsertAsync(IBlob t)
{
var blobReference = _container.GetBlockBlobReference(t.Id);
if(await blobReference.ExistsAsync())
throw new InvalidOperationException("Key already exists: " + t.Id);
await UpsertAsync(t);
}
示例12: AddBlob
public void AddBlob(IBlob blob)
{
if (blob==null)
{
throw new NullReferenceException(Messeges.NullBlobReference);
}
this.blobs.Add(blob);
}
示例13: Trigger
public override void Trigger(IBlob blob)
{
if (!this.HasTriggered)
{
this.HasTriggered = true;
blob.Damage *= 2;
}
}
示例14: Engine
public Engine(IBlob blob, Data data, IInputReader reader, IBlobFactory blobFactory, IOutputWriter writer)
{
this.blob = blob;
this.data = data;
this.reader = reader;
this.blobFactory = blobFactory;
this.writer = writer;
}
示例15: AddBlob
/// <summary>
/// Adding a Blob to the data.
/// </summary>
/// <param name="blob"></param>
public void AddBlob(IBlob blob)
{
if (blob == null)
{
throw new ArgumentException("Blob cannot be created without the foll");
}
this.blops.Add(blob);
}