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


C# Buff类代码示例

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


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

示例1: Stack

 public override bool Stack(Buff buff)
 {
     // not sure how knockbacks would be combined, so just swallow all knockback stacks for now
     // updated stacked buff with mover so arrival time can be read for would-be-stacked buff.
     ((KnockbackBuff)buff)._mover = _mover;
     return true;
 }
开发者ID:n4v,项目名称:mooege,代码行数:7,代码来源:KnockbackBuff.cs

示例2: Update

    void Update () {
		if (Util.hit != null) {
			if ((tempBuff = Util.hit.GetComponent<Buff>()) != null) {
				if (hoverBuff == null || hoverBuff != tempBuff) {
					if (hoverBuff != null) { hoverBuff.setHover(false); }
					hoverBuff = tempBuff;
					itemDescriptor.showDescription(hoverBuff);
					hoverBuff.setHover(true);
				}
			} else if ((tempHolder = Util.hit.GetComponent<BuffEquipmentHolder>()) != null && tempHolder.getItem() != null) {
				if (hoverHolder == null || hoverHolder != tempHolder) {
					hoverHolder = tempHolder;
					itemDescriptor.showDescription(hoverHolder.getItem());
					itemDescriptor.hideActionMsg();
					if (hoverBuff != null) { hoverBuff.setHover(false); hoverBuff = null; }
					if (tempBuff != null) { tempBuff.setHover(false); tempHolder = null; }
				}
			} else {
				if (hoverBuff != null) { hoverBuff.setHover(false); hoverBuff = null; }
				if (tempBuff != null) { tempBuff.setHover(false); tempHolder = null; }
				if (itemDescriptor.isOnScreen()) { itemDescriptor.hideDescription(); }
			}
        } else {
            if (itemDescriptor.isOnScreen()) { itemDescriptor.hideDescription(); }
            if (tempBuff != null) { tempBuff.setHover(false); tempBuff = null; }
            if (hoverBuff != null) { hoverBuff.setHover(false); hoverBuff = null; }
			if (tempHolder != null) { tempHolder = null; }
			if (hoverHolder != null) { hoverHolder = null; }
        }
		if (Input.GetMouseButtonDown(1) && hoverBuff != null) {
			buyBuff(hoverBuff);
			itemDescriptor.showDescription(hoverBuff);
		}
    }
开发者ID:aintech,项目名称:Heroes_of_Routine,代码行数:34,代码来源:BuffShop.cs

示例3: buffFinish

 public void buffFinish(Character character, Buff self)
 {
     foreach(GameObject obj in desGameObjectList)
     {
         Destroy(obj);
     }
 }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:7,代码来源:Skill_CAIERA15B.cs

示例4: AddBuffToStats

 public void AddBuffToStats(Buff buff)
 {
     if (buff != null) {
         this.buff.AddBuff (buff);
         this.stats.AddBuff (buff);
     }
 }
开发者ID:rwbysafire,项目名称:DemonHeart,代码行数:7,代码来源:Mob.cs

示例5: addToBuffs

	public override void addToBuffs (Buff buff) {
		base.addToBuffs(buff);
		switch (buff.getBuffType()) {
			case BuffType.POISON_DAMAGE: poisonDamage.gameObject.SetActive(true); break;
			case BuffType.FASTER_ATTACK: fasterAttack.gameObject.SetActive(true); break;
			default: Debug.Log("Unknown Buff Type"); break;
		}
	}
开发者ID:aintech,项目名称:Heroes_of_Routine,代码行数:8,代码来源:WeaponItem.cs

示例6: Stack

        public override bool Stack(Buff buff)
        {
            if (((SimpleBooleanStatusDebuff)buff)._immuneBlocked)
                return true;  // swallow buff if it was blocked

            return base.Stack(buff);
        }
开发者ID:loonbg,项目名称:mooege,代码行数:7,代码来源:StatusDebuffs.cs

示例7: cancelSkill_BETARAYBILL30A

 private void cancelSkill_BETARAYBILL30A(Character character, Buff self)
 {
     GameObject caller = objs[1] as GameObject;
     BetaRayBill betaRayBill = caller.GetComponent<BetaRayBill>();
     betaRayBill.isTrigger30A = false;
     Destroy(bodyLighting);
 }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:7,代码来源:Skill_BETARAYBILL30A.cs

示例8: PerformRitual

 public void PerformRitual(List<GameObject> items)
 {
     buff = new Buff[] { Buff.HEALTH_REGEN, Buff.HEALTH_REGEN, Buff.HEALTH_REGEN, Buff.REPAIR_TOWERS }[Random.Range(0, 4)];
     message.setUIMessage("Ritual complete. " + (buff == Buff.HEALTH_REGEN ? "Regenerating health." : "Repairing towers."), 7);
     state = State.PERFORMING_RITUAL;
     timer = 5;
 }
开发者ID:Flave229,项目名称:Jampire-Knights-Game-Jam-2016,代码行数:7,代码来源:RitualManager.cs

示例9: AddBuff

    public void AddBuff(int buffID, StatServer firerStat, Buff.Handle onBuff, Buff.Handle onDebuff)
    {
        StatusEffectEntity2 buffEntity = TableLoader.GetTable<StatusEffectEntity2>().Get(buffID);
        CheckBuffType(buffEntity);

        Buff buff = new Buff(buffEntity, firerStat, onBuff, onDebuff);
        AddBuff(buff);
    }
开发者ID:pb0,项目名称:ID0_Test,代码行数:8,代码来源:BuffControl.cs

示例10: add

 public bool add(Buff buff)
 {
     if (buff == null) {
         System.Diagnostics.Debug.Assert (false);
     }
     buffs.Add (buff);
     return true;
 }
开发者ID:vincenthanna,项目名称:bladerunner,代码行数:8,代码来源:BuffContainer.cs

示例11: TrinityBuff

 public TrinityBuff(Buff buff)
 {
     _buff = buff;
     InternalName = buff.InternalName;
     IsCancellable = buff.IsCancelable;
     StackCount = buff.StackCount;
     Id = buff.SNOId;
 }
开发者ID:artious,项目名称:unifiedTrinity-2.x.x,代码行数:8,代码来源:TrinityBuff.cs

示例12: ActivateAbility

	public void ActivateAbility(Buff inBuff)
	{
		BuffInfo mod = inBuff.abilitiesModifier;
		for (int i = 0; i < buffNames.Length; ++i)
		{
			inBuff.SetBuff(buffNames[i], basePower, baseTime, infinite);
		}
	}
开发者ID:KenReaGameDev,项目名称:Apparent-Horizon,代码行数:8,代码来源:Ability.cs

示例13: buffFinish

 public void buffFinish(Character character, Buff self)
 {
     StopCoroutine("changeSkillEft_MANTIS15A");
     StopCoroutine("moveSkillEft_MANTIS15A1");
     StopCoroutine("moveSkillEft_MANTIS15A2");
     Destroy(skillEft_MANTIS15A);
     //		character.hurtBeforeState = Character.HurtBeforeState.HURT;
     character.lossTargetBeforeState = Character.LossTargetBeforeState.NONE;
 }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:9,代码来源:Skill_MANTIS15A.cs

示例14: RemoveBuff

 public bool RemoveBuff(Buff buff)
 {
     var removed = buffs.Remove(buff);
     if (removed)
     {
         buff.Unapply(self);
     }
     return removed;
 }
开发者ID:TerribleProductions,项目名称:BREACH,代码行数:9,代码来源:BuffManager.cs

示例15: specialTechniquesOn

 public void specialTechniquesOn(Buff buff)
 {
     Debug.Log ("Special On");
     if (CoinCount < buff.NeedCoinCount) {
         return;
     }
     CoinCount -= buff.NeedCoinCount;
     buffContainer.add ((Buff)System.Activator.CreateInstance (buff.GetType ()));
 }
开发者ID:vincenthanna,项目名称:bladerunner,代码行数:9,代码来源:RunnerController.cs


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