Skip to content

OnDecayHeal

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnDecayHeal( DecayEntity instance )
{
    Puts( "OnDecayHeal works!" );
}

Location

  • DecayEntity::OnDecay(Decay decay, float decayDeltaTime)
csharp
//---
		}
		if (this.upkeepTimer < 1f)
		{
			if (base.healthFraction < 1f && this.GetEntityHealScale() > 0f && base.SecondsSinceAttacked > 600f)
			{
				if (Interface.CallHook("OnDecayHeal", this) != null)
				{
					return;
				}
				float num2 = decayDeltaTime / this.GetEntityDecayDuration() * this.GetEntityHealScale();
				this.Heal(this.MaxHealth() * num2);
//---

Released under the MIT License.