Class BonusCause
Defines when a bonus should trigger.
Inheritance
System.Object
BonusCause
Implements
Namespace: Eco.Gameplay.Bonuses
Assembly: Eco.Gameplay.dll
Syntax
public abstract class BonusCause : Object, IDescribable
Constructors
BonusCause()
Declaration
protected BonusCause()
Methods
Description()
Describe when this cause triggers (Example: "when crafting wooden planks").
Declaration
public abstract LocString Description()
Returns
| Type | Description |
|---|---|
| LocString |
IsTriggered(BonusContext)
Check if this cause is triggered for the given context. All causes in a Bonus must return true for the bonus to apply.
Declaration
public abstract bool IsTriggered(BonusContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| BonusContext | context |
Returns
| Type | Description |
|---|---|
| System.Boolean |