Click or drag to resize

Buff Class

Represents an Upgrade that is only applicable for a specified duration, and gets removed afterwards.

Needs to be added through Apply(IUpgradeable) to an IUpgradeable for the timer to start.

Inheritance Hierarchy

Namespace:  Kit.Containers
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0
Syntax
C#
[SerializableAttribute]
public class Buff : Upgrade
Request Example View Source

The Buff type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyTimeLeft
Time remaining in seconds before the buff expires.
Top
Methods
  NameDescription
Public methodApply(IUpgradeable)
Add the buff to an IUpgradeable and start the timer.
(Overrides UpgradeApply(IUpgradeable).)
Public methodApply(IUpgradeable, BuffMode)
Add the buff to an IUpgradeable and start the timer.
Public methodRemoveFrom
Remove the buff from an IUpgradeable.
Top
Fields
  NameDescription
Public fieldDuration
Duration of the buff in seconds.
Public fieldMode
Action to take when a buff with the same ID already exists.
Top
Examples
float buffTime = 10.0f;
Buff damageBuff = new Buff("DamagePickup", buffTime);
damageBuff.AddEffect("Damage", "x2");
damageBuff.Apply(ship);
See Also