本文整理汇总了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;
}
示例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);
}
}
示例3: buffFinish
public void buffFinish(Character character, Buff self)
{
foreach(GameObject obj in desGameObjectList)
{
Destroy(obj);
}
}
示例4: AddBuffToStats
public void AddBuffToStats(Buff buff)
{
if (buff != null) {
this.buff.AddBuff (buff);
this.stats.AddBuff (buff);
}
}
示例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;
}
}
示例6: Stack
public override bool Stack(Buff buff)
{
if (((SimpleBooleanStatusDebuff)buff)._immuneBlocked)
return true; // swallow buff if it was blocked
return base.Stack(buff);
}
示例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);
}
示例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;
}
示例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);
}
示例10: add
public bool add(Buff buff)
{
if (buff == null) {
System.Diagnostics.Debug.Assert (false);
}
buffs.Add (buff);
return true;
}
示例11: TrinityBuff
public TrinityBuff(Buff buff)
{
_buff = buff;
InternalName = buff.InternalName;
IsCancellable = buff.IsCancelable;
StackCount = buff.StackCount;
Id = buff.SNOId;
}
示例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);
}
}
示例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;
}
示例14: RemoveBuff
public bool RemoveBuff(Buff buff)
{
var removed = buffs.Remove(buff);
if (removed)
{
buff.Unapply(self);
}
return removed;
}
示例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 ()));
}