Class BuffEffectInfo
It contains buff information that depends on each character, such as elapsed time or stacks.
Inheritance
System.Object
BuffEffectInfo
Namespace: AutoBattleFramework.Skills
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class BuffEffectInfo
Constructors
BuffEffectInfo(BuffEffect, GameCharacter, Int32, Single)
Constructor of BuffEffectInfo.
Declaration
public BuffEffectInfo(BuffEffect buff, GameCharacter character, int stacks, float duration)
Parameters
| Type | Name | Description |
|---|---|---|
| BuffEffect | buff | Buff that affects the character. |
| GameCharacter | character | Character affected by the buff. |
| System.Int32 | stacks | Number of current stacks. |
| System.Single | duration | Duration of the buff. |
Fields
buff
Buff that applies to the character.
Declaration
public BuffEffect buff
Field Value
| Type | Description |
|---|---|
| BuffEffect |
character
Declaration
public GameCharacter character
Field Value
| Type | Description |
|---|---|
| GameCharacter |
duration
Duration of the buff, in seconds.
Declaration
protected float duration
Field Value
| Type | Description |
|---|---|
| System.Single |
elapsedTime
Time the buff has been applied.
Declaration
public float elapsedTime
Field Value
| Type | Description |
|---|---|
| System.Single |
stacks
Number of current stacks.
Declaration
public int stacks
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
CanBeRemoved()
Check if the elapsed time is greater than the duration. In that case, the buff should end.
Declaration
public bool CanBeRemoved()
Returns
| Type | Description |
|---|---|
| System.Boolean | True if elapsed time is greater that duration |
RestartTime()
Set the elapsed time to 0.
Declaration
public void RestartTime()
UpdateTime(Single)
Adds the value to the elapsed time. Normally the value is equal to Time.deltatime.
Declaration
public void UpdateTime(float time)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Single | time | Delta time. |