Increments an element of the Lua Variable[] table when the GameObject is destroyed or disabled, and then updates the quest tracker if it's attached to the Dialogue Manager object or its children.
More...
|
void | OnEnable () |
| Only listen for OnDestroy if the script has been enabled. More...
|
|
void | OnLevelWillBeUnloaded () |
| If the level is being unloaded, this GameObject will be destroyed. More...
|
|
void | OnApplicationQuit () |
| If the application is ending, don't listen, as this can log errors in the console. More...
|
|
void | OnDestroy () |
| When this object is destroyed, increment the counter and update the quest tracker if incrementOn is set to Destroy. More...
|
|
void | OnDisable () |
| When this object is disabled, increment the counter and update the quest tracker if incrementOn is set to Disable. More...
|
|
void | TryIncrement () |
|
Increments an element of the Lua Variable[] table when the GameObject is destroyed or disabled, and then updates the quest tracker if it's attached to the Dialogue Manager object or its children.
This script is useful for kill quests or gathering quests.
◆ IncrementOn
Enumerator |
---|
Destroy | |
Disable | |
◆ OnApplicationQuit()
void PixelCrushers.DialogueSystem.IncrementOnDestroy.OnApplicationQuit |
( |
| ) |
|
If the application is ending, don't listen, as this can log errors in the console.
◆ OnDestroy()
void PixelCrushers.DialogueSystem.IncrementOnDestroy.OnDestroy |
( |
| ) |
|
When this object is destroyed, increment the counter and update the quest tracker if incrementOn is set to Destroy.
◆ OnDisable()
void PixelCrushers.DialogueSystem.IncrementOnDestroy.OnDisable |
( |
| ) |
|
When this object is disabled, increment the counter and update the quest tracker if incrementOn is set to Disable.
◆ OnEnable()
void PixelCrushers.DialogueSystem.IncrementOnDestroy.OnEnable |
( |
| ) |
|
Only listen for OnDestroy if the script has been enabled.
◆ OnLevelWillBeUnloaded()
void PixelCrushers.DialogueSystem.IncrementOnDestroy.OnLevelWillBeUnloaded |
( |
| ) |
|
If the level is being unloaded, this GameObject will be destroyed.
We don't want to count this in the variable, so disable the script.
◆ TryIncrement()
void PixelCrushers.DialogueSystem.IncrementOnDestroy.TryIncrement |
( |
| ) |
|
◆ alertDuration
float PixelCrushers.DialogueSystem.IncrementOnDestroy.alertDuration = 0 |
◆ alertMessage
string PixelCrushers.DialogueSystem.IncrementOnDestroy.alertMessage = string.Empty |
◆ condition
◆ increment
int PixelCrushers.DialogueSystem.IncrementOnDestroy.increment = 1 |
The increment amount.
To decrement, use a negative number.
◆ incrementOn
◆ max
int PixelCrushers.DialogueSystem.IncrementOnDestroy.max = 100 |
◆ min
int PixelCrushers.DialogueSystem.IncrementOnDestroy.min = 0 |
◆ onIncrement
UnityEvent PixelCrushers.DialogueSystem.IncrementOnDestroy.onIncrement = new UnityEvent() |
◆ variable
string PixelCrushers.DialogueSystem.IncrementOnDestroy.variable = string.Empty |
The variable to increment.
◆ ActualVariableName
string? PixelCrushers.DialogueSystem.IncrementOnDestroy.ActualVariableName |
|
getprotected |
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Release/Assets/Dialogue System/Scripts/Supplemental/Utility/IncrementOnDestroy.cs