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.
Namespace: Kit.Containers
The Buff type exposes the following members.
| Name | Description | |
|---|---|---|
| Buff | Create a new Buff. | |
| Buff(String, Single, BuffMode) | Create a new Buff. | |
| Buff(String, IEnumerableEffect, Single, BuffMode) | Create a new Buff. |
| Name | Description | |
|---|---|---|
| Apply(IUpgradeable) | Add the buff to an IUpgradeable and start the timer. (Overrides UpgradeApply(IUpgradeable).) | |
| Apply(IUpgradeable, BuffMode) | Add the buff to an IUpgradeable and start the timer. | |
| RemoveFrom | Remove the buff from an IUpgradeable. |
| Name | Description | |
|---|---|---|
| Duration | Duration of the buff in seconds. | |
| Mode | Action to take when a buff with the same ID already exists. |
float buffTime = 10.0f; Buff damageBuff = new Buff("DamagePickup", buffTime); damageBuff.AddEffect("Damage", "x2"); damageBuff.Apply(ship);