本文整理汇总了C#中Hero.Heal方法的典型用法代码示例。如果您正苦于以下问题:C# Hero.Heal方法的具体用法?C# Hero.Heal怎么用?C# Hero.Heal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Hero
的用法示例。
在下文中一共展示了Hero.Heal方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Collected
public override void Collected(Hero collector)
{
collector.FullHealth += 2f;
collector.Heal(2f);
base.CreatePopUpText("HP +", collector);
//GameObject.Destroy(gameObject);
}
示例2: OnActivate
/* BEGIN REGULAR POWER */
public override IEnumerator OnActivate(Hero sourceHero, Hero otherHero)
{
//Debug.Log("Activating" + this.GetType());
otherHero.Heal(regenPerSecond);
return base.OnActivate(sourceHero, otherHero);
}
示例3: Collected
public override void Collected(Hero collector)
{
collector.movementSpeedBuff -= 1f;
collector.FullHealth += 4f;
collector.Heal(4f);
base.CreatePopUpText("HP ++ Speed -", collector);
//GameObject.Destroy(gameObject);
}
示例4: Collected
public override void Collected(Hero collector)
{
if (_collected == true) return;
_collected = true;
gameObject.audio.clip = HealthPickupSound;
gameObject.audio.Play();
collector.Heal(2);
gameObject.renderer.enabled = false;
for (int i = 0; i < gameObject.transform.childCount; i++) {
gameObject.transform.GetChild(i).gameObject.SetActive(false);
}
Destroy(gameObject, HealthPickupSound.length);
}
示例5: OnActivateSync
public override IEnumerator OnActivateSync(Hero sourceHero, Hero otherHero, bool secondSync = false)
{
//Debug.Log("Activating" + this.GetType() + " SYNC POWER!");
if (!secondSync)
{
//Pay for activation
sourceHero.ChangeSpiritAmount(-costActivateSync);
otherHero.ChangeSpiritAmount(-costActivateSync);
//Stop other Heros effect
otherHero.SwitchToSyncPower();
}
//Heal both players
otherHero.Heal(regenPerSync);
sourceHero.Heal(regenPerSync);
return null;
}
示例6: OnUpdate
public override IEnumerator OnUpdate(Hero sourceHero, Hero otherHero)
{
otherHero.Heal(regenPerSecond * Time.deltaTime);
return null;
}