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


C# IBlob类代码示例

本文整理汇总了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;
        }
开发者ID:georgidhristov,项目名称:Csharp---OOP,代码行数:30,代码来源:AttackBlob.cs

示例2: ToggledEffect

 public override void ToggledEffect(IBlob blob)
 {
     if (this.HasTriggered)
     {
         blob.Health -= 10;
     }
 }
开发者ID:zhecho1215,项目名称:Softuni,代码行数:7,代码来源:InflatedBehavior.cs

示例3: Behave

 public void Behave(IBlob blob)
 {
     if (blob.Damage - 5 >= this.initialDamage)
     {
         blob.Damage -= 5;
     }
 }
开发者ID:psdimitrov,项目名称:homeworks,代码行数:7,代码来源:Aggressive.cs

示例4: Blob

        internal Blob(IBlob blob)
        {
            if(blob.Id != Guid.Empty)
                Id = blob.Id;

            OwnerUserId = blob.OwnerUserId;
        }
开发者ID:aluitink,项目名称:Ojibwe,代码行数:7,代码来源:Blob.cs

示例5: FireEvent

 protected void FireEvent(IBlob parent)
 {
     if (this.HasTriggered != null)
     {
         this.HasTriggered(parent);
     }
 }
开发者ID:hristodobrev,项目名称:Software-University,代码行数:7,代码来源:Behavior.cs

示例6: ValidateHelth

 public static void ValidateHelth(IBlob blob)
 {
     if (blob.Health < 0)
     {
         blob.Health = 0;
     }
 }
开发者ID:zhecho1215,项目名称:Softuni,代码行数:7,代码来源:AttackAbstract.cs

示例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;
 }
开发者ID:BgRva,项目名称:Blob1,代码行数:14,代码来源:DummyOutputNeutralPort.cs

示例8: ApplyBehaviorTurn

 public override void ApplyBehaviorTurn(IBlob blob)
 {
     if (blob.InitialDamage <= blob.Damage - DefaultAggressiveBehaviorDamageTurnSubtraction)
     {
         blob.Damage -= DefaultAggressiveBehaviorDamageTurnSubtraction;
     }
 }
开发者ID:eslavov11,项目名称:SoftUni-Homework,代码行数:7,代码来源:AggressiveBehavior.cs

示例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;
		}
开发者ID:smhinsey,项目名称:Euclid,代码行数:7,代码来源:Blob.cs

示例10: ApplyHealthEffect

 protected override void ApplyHealthEffect(IBlob blob)
 {
     if (blob.Health/2 >= 1)
     {
         blob.Health /= 2;
     }
     else blob.Health = 1;
 }
开发者ID:ToniDimitrov,项目名称:SoftUni-Homeworks-High-Quality-Code,代码行数:8,代码来源:BlobplodeAttack.cs

示例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);
        }
开发者ID:kgeis,项目名称:BeeHive,代码行数:8,代码来源:AzureKeyValueStore.cs

示例12: AddBlob

 public void AddBlob(IBlob blob)
 {
     if (blob==null)
     {
         throw new NullReferenceException(Messeges.NullBlobReference);
     }
     this.blobs.Add(blob);
 }
开发者ID:zhecho1215,项目名称:Softuni,代码行数:8,代码来源:Database.cs

示例13: Trigger

 public override void Trigger(IBlob blob)
 {
     if (!this.HasTriggered)
     {
         this.HasTriggered = true;
         blob.Damage *= 2;
     }
 }
开发者ID:zhecho1215,项目名称:Softuni,代码行数:8,代码来源:AggressiveBehavior.cs

示例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;
 }
开发者ID:sashkooooy,项目名称:MyRepo,代码行数:8,代码来源:Engine.cs

示例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);
 }
开发者ID:IlianStefanov,项目名称:SoftUni,代码行数:12,代码来源:BlobData.cs


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