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

C# Buff类代码示例

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

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



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


示例6: 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


示例7: 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


示例8: 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


示例9: 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


示例10: 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


示例11: 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


示例12: 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


示例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


示例16: isOn

 public bool isOn(Buff buff)
 {
     foreach (Buff b in buffs) {
         if (b.GetType() == buff.GetType()) {
             return true;
         }
     }
     return false;
 }
开发者ID:vincenthanna,项目名称:bladerunner,代码行数:9,代码来源:BuffContainer.cs


示例17: Awake

 void Awake()
 {
     base.Init();
     buff = new AimModeBuff();
     aimLine = abilityOwner.gameObject.AddComponent<LineRenderer>();
     aimLine.material = (Material) Resources.Load ("Characters/Alice/Abilities/AimMode/SniperColorMaterial");
     aimLine.enabled = false;
     aimLine.SetWidth(0.1f, 0.1f);
 }
开发者ID:TerribleProductions,项目名称:BREACH,代码行数:9,代码来源:AimMode.cs


示例18: CheatBuffContainer

        /// <summary>
        /// Creates a new instance of the CheatBuffContainer class
        /// </summary>
        /// <param name="i">The Buff of the CheatBuffContainer</param>
        public CheatBuffContainer(Buff i)
        {
            Buff = i;

            Tooltip = "";

            if (Buff.ID > 0)
                Tooltip = Buff.DisplayName + "\n" + Buff.Tooltip;
        }
开发者ID:mugmickey,项目名称:Ingame-Cheat-Menu,代码行数:13,代码来源:CheatBuffContainer.cs


示例19: buffFinish

 protected void buffFinish(Character c, Buff self)
 {
     Destroy(shieldEft);
     Destroy(haloEft);
     for(int n = PopEftList.Count-1;n >= 0;n--){
         Destroy(PopEftList[n].gameObject);
     }
     PopEftList.Clear();
 }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:9,代码来源:Skill_REDKING30A.cs


示例20: addToBuffs

	public override void addToBuffs (Buff buff) {
		base.addToBuffs(buff);
		switch (buff.getBuffType()) {
			case BuffType.ANTI_POISON: antiPoison.gameObject.SetActive(true); break;
			case BuffType.EXTRA_HEALTH: extraHealth.gameObject.SetActive(true); break;
			case BuffType.REGENERATION: regeneration.gameObject.SetActive(true); break;
			default: Debug.Log("Unknown Buff Type"); break;
		}
	}
开发者ID:aintech,项目名称:Heroes_of_Routine,代码行数:9,代码来源:ArmorItem.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# BuffIcon类代码示例发布时间:2022-05-24
下一篇:
C# BucketContext类代码示例发布时间: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